Jump to content
Sign in to follow this  
Prv_Jezz

Hostage Script [MP]

Recommended Posts

Hi Guys,

i had a smal Hostage Script in Singleplayer and on selfHostet Multiplayer it works but on Deticated not perfect.

I think there is just a smal smal failure maybee some smart guy can find the problem. :confused:

I placed a Civilian (Name: h1) and in his init: _null = [this] execVM "Hostage.sqf";

So he is sitting on the Ground and waits i see also the FreeME AddAction the Animation of free him is played but he is sitting there and does nothing.

After he is free he should go to the marker (i placed on the map) evac1. In the Editor he sometimes if he is free dont runs away maybee he is

scarred of the weapons around him.. But in MP is dont works att all.... please HELP! :j:

HE Should NOT join the group just go to the marker evac1. Maybee a silent hint like "thanks" would be nice.. :D

Hostage.sqf

// _null = [this] execVM "Hostage.sqf";
//
_CivnotRescued = true;
_man = _this select 0;
_man setcaptive true;
_man disableAI "MOVE";
_man disableAI "ANIM";
_man action ["SITDOWN",_man];
_hostageact1 = _man addaction ["FreeME","Hostagevars.sqf"];

while {_CivnotRescued} do {
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
};

_man removeaction _hostageact1;
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 enableAI "ANIM";
_man switchmove "SitStandUp";
detach player;
sleep 2;
_man enableAI "MOVE";
_pos1 = getMarkerPos "evac1";
_grp = group h1;
_wp = _grp addWaypoint [_pos1, 0];
[_grp, 0] setWaypointType "MOVE";

};

Hostagevars.sqf

_unit=_this select 0;
_unit setcaptive false;

greetings

Jezz

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  

×