Im using a version of right click deploy bike script, making use of maca's right click system. Anyways I'm trying to do 2 things.
1. Im trying to allow an interrupt which will cancel the build when the player moves. For example if the player is deploying the bike and gets shot at and needs to cancel the build.
2. Currently my deploy script nicely places the bike in front of you. But I have seen servers which attach the buildable to the player, and allows the player to move the buildable into position before placing it.
Obviously the 2 would have to work together, so that moving to place the buildable doesn't cancel the build until you've actually started to build it.
Here is my current deploy script.
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
closeDialog 0;
_toolbox = "ItemToolbox" in _weapons;
if (!_toolbox) then {
cutText [format["Missing Toolbox"], "PLAIN DOWN"];
} else {
player removeAction s_player_deploybike;
player playActionNow "Medic";
r_interrupt = false;
player removeWeapon "ItemToolbox";
_dis=10;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 6;
_Offset = [0,5,0]; //change how far from player vehicle spawns
_worldPos = player modelToWorld _Offset; // spawn in front of player
_object = "MMT_USMC" createVehicle (_worldPos);
_object setVariable ["ObjectID", "1", true];
_object setVariable ["ObjectUID", "1", true];
_object setVariable ["Deployed", "1", true];
_degrees = getDir player;
_object setDir _degrees;
player reveal _object;
cutText [format["Here's your bike you lazy bum!"], "PLAIN DOWN"];
r_interrupt = false;
player switchMove "";
player playActionNow "stop";
sleep 10;
cutText [format["Warning: Spawned bikes DO NOT SAVE after server restart! If you wish to keep it - deconstruct it!"], "PLAIN DOWN"];
};
Here is an example of what Im talking about. Although I dont want to use the EVD script which he is using and has modified.
Question
DangerRuss
Im using a version of right click deploy bike script, making use of maca's right click system. Anyways I'm trying to do 2 things.
1. Im trying to allow an interrupt which will cancel the build when the player moves. For example if the player is deploying the bike and gets shot at and needs to cancel the build.
2. Currently my deploy script nicely places the bike in front of you. But I have seen servers which attach the buildable to the player, and allows the player to move the buildable into position before placing it.
Obviously the 2 would have to work together, so that moving to place the buildable doesn't cancel the build until you've actually started to build it.
Here is my current deploy script.
Here is an example of what Im talking about. Although I dont want to use the EVD script which he is using and has modified.
https://www.youtube.com/watch?v=oASs2_RUX88&feature=youtu.be
Thanks for any help!
Link to comment
Share on other sites
32 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now