Jump to content
Sign in to follow this  
Sardinia

Help! Weird script bug

Recommended Posts

I have a hostage rescue mission im trying to play with my friend, works fine single player. But whenever I try to play with 2 people the script activates automatically after about 10 seconds ingame and releases the hostage while teleporting player 2 to his location.

Using this script

// execute with in units initline.
// _null = [this] execVM "Hostage_male.sqf"
// hostage
_CivnotRescued = true;
_man = _this select 0;
_man setcaptive true;
_hostageact1 = _man addaction ["Untie","hostagevars.sqf","(_target distance _this) < 2"];

while {_CivnotRescued} do {
_num=(ceil(Random 3));
if (_num==0) then {_man switchmove "civilsitting"};
if (_num==1) then {_man switchmove "civilsitting01"};
if (_num==2) then {_man switchmove "civilsitting02"};
if (_num==3) then {_man switchmove "civilsitting03"};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
};

_man removeaction _hostageact1;
_man disableAI "MOVE";
if (alive _man) then {
player attachto [_man,[0,-0.9,0]];
player setdir 0;
player switchmove "AinvPknlMstpSnonWrflDnon_medic";
sleep 3;
player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd";
sleep 1;
player switchmove "";
_man switchmove "SitStandUp";
detach player;
sleep 2;
_man enableAI "MOVE";
// just put // before this if you dont want the unit to join your group
[_man] joinsilent player;
};

---------- Post added at 05:37 PM ---------- Previous post was at 05:29 PM ----------

I figured out why it teleports. But not why it triggers in the beginning when running multiplayer

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×