Jump to content
  • 0

Deploy Bike Death


Turtle

Question

Hey guys, so I have added this to my server
http://dayz.st/w/Deployable_Bike/Motorcycle/GyroCopter
and I was like, yeah so simple BANG. Got it up and going in no time, tested it and all. Then when it gets on my public server people are dying left a right from hoping on the bike after they deploy it.

I also have changed the script so that to spawn a bike you have to right click on your tool box using this:

http://epochmod.com/forum/index.php?/topic/4834-add-right-click-options-to-items/

Anyone have a solution to this?

 

FIXED

 

go to @DayZ_Epoch, find DayZ_code, unpack it and copy the variables.sqf over to your mission files.

 

Go into variables.sqf and look for the DZE_SafeVehicles line.

 

Add in whatever it is that your script is spawning 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
Edit server_updateObject.sqf
 
Located: dayz_server\compile\server_updateObject.sqf
 
 
Insert the code below before : if (!_parachuteWest and !(locked _object)) then {
 
if (_object getVariable "Sarge" == 1) exitWith {};
 
 
 
Around line 22 look for this:
 
{
diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
//force fail
_objectID = "0";
_uid = "0";
};
 
comment this out and add the line below :
 
//if (_objectID == "0" && _uid == "0") then
if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then
{
 
Edit server_functions.sqf
 
Located: dayz_server\init\server_functions.fsm
 
Around line 298 look for this:
 
if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x) && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
 
Replace with this:
 
if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x) && (vehicle _x getVariable ["Sarge",0] != 1) && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
 
Repack your dayz_server.pbo and replace your original one.
 
Then all you have to do, is set variable for the deployed bike to Sarge and it wont kill your players. I use sarge because of my Missions system and Sarge AI
Its easier to just leave it the way it is, with Sarge as the variable rather then having to figure out what lines for you to change.
 
Now when you want a .sqf to spawn a vehicle you just add the line :
 
_object setVariable ["Sarge", "1", true];
 
This is my deploys.sqf line :
 
_object = "MMT_USMC" createVehicle (position player);
_object setVariable ["Sarge", "1", true];
_object setVariable ["ObjectID", "1", true];
_object setVariable ["ObjectUID", "1", true];
 
 
Since the 1.0.4 series of epoch releases, this code still produces server errors, but it still works. I'm not sure why the errors happen, but i haven't had any issues with it working in game at all.
 
 
Any other questions let me know, also let me know if you get it working.
Link to comment
Share on other sites

  • 0

Whoa there FriendlyPA I got it, and it is WAY simpler than that lol.

 

Call variables.sqf into your mission files

 

find the DZE_SafeVehicles line

 

Add your vehicles to it that are spawning from the script.

 

Fixed.

Hi, 

can you please put here exact tutorial what to do, where put which file (for newbies like me).. after almost 7 hours i made bike deploy and pack working, but in some cases riding the bike causes instant death.. i hope it can be solved with your solution, but i cant understand what exactly should i do..

 

I have installed DayZ epoch 1.0.4.2 with installed BEC, snap build, DZMS and DZAI. Hosted by Vilayer. 

 

Thank you very much for help ;)

Link to comment
Share on other sites

  • 0

If you go into the @DayZ_Epoch Folder in your Arma 2 OA directory, look for DayZ_code.pbo. right click on it and unpack it with a pbo manager. Next go into that folder then go to addons\dayz_code\init and in that folder there should be a variables.sqf

 

Copy this into a folder called 'custom' in the root of your mpmissions folder. 

 

in your init.sqf look for this line:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";

and change it to

call compile preprocessFileLineNumbers "custom\variables.sqf";

Now inside the variables.sqf we moved to the 'custom' folder earlier, inside it find the line that looks like this:

["ParachuteWest","ParachuteC","kh_maule_m7_white_DZ"];

which for me is at line 594

 

At the end of that line just add in whatever bike it is that is spawning from your deploy bike script...

in this case for me its:

["ParachuteWest","ParachuteC","kh_maule_m7_white_DZ","Old_bike_TK_INS_EP1","AN2_DZ","An2_1_TK_CIV_EP1","TT650_Civ","CSJ_GyroC"];

The stuff I have added is from my deploy mozzie, motorbike and bike script. 

 

After that you should be done. Just repack for mission file and upload it to your server.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...