Jump to content
Sign in to follow this  
1para{god-father}

Capture Unit

Recommended Posts

Having an issue with capturing a unit

init.sqf

fnc_unitinit= {_this addaction ['Capture', 'scripts\capture.sqf', [],1,false,true,'',''];}; 

_grp = createGroup WEST;
_TAG_pilot = _grp createUnit ["B_Helipilot_F", _pos, [], 0, "FORM"];
_TAG_pilot setCaptive true;
_TAG_pilot allowDamage false;
_TAG_pilot setHit ["hands",1];
_TAG_pilot setHit ["head_hit",0.4];
_TAG_pilot setHit ["body",0.5];
_TAG_pilot playMoveNow "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
_TAG_pilot disableAI "MOVE";
_TAG_pilot disableAI "ANIM";
removeAllWeapons _TAG_pilot;
[_TAG_pilot, "fnc_unitinit", nil, true] spawn BIS_fnc_MP; 

Works great on testing in MP but then on Dedi it works fine unless you leave and rejoin then you never get the addaction again ?

Any way to get this working with JIP as i thought this would work.

Thanks

Share this post


Link to post
Share on other sites

Change the action to this:

fnc_unitinit= {_Act = _this addaction ['Capture', 'scripts\capture.sqf', [],1,false,true,'',''];};

Put this inside your Init.sqf:

if (isNil "_Act") then {fnc_unitinit= {_Act = unitname addaction ['Capture', 'scripts\capture.sqf', [],1,false,true,'',''];};} else {};

Dirty Haz

Edited by Dirty Haz
Updated post

Share this post


Link to post
Share on other sites

hmmmmm

so i would have this in my INIT ? still seems not to work on JIP

fnc_unitinit= {_Act =_this addaction ['Capture', 'scripts\capture.sqf', [],1,false,true,'','((side _this) == west)'];}; 

if (isNil "_Act") then {fnc_unitinit= {_Act = _TAG_pilot addaction ['Capture', 'scripts\capture.sqf', [],1,false,true,'',''];};} else {};

Share this post


Link to post
Share on other sites

_Act = unitname addAction ['Capture', 'scripts\capture.sqf', [], 1, false, true, '', '(side player == west)'];

if (isNil "_Act") then {_Act = unitname addAction ['Capture', 'scripts\capture.sqf', [], 1, false, true, '', '(side player == west)'];} else {};

Dirty Haz

Share this post


Link to post
Share on other sites

Still no joy !

Anyone got a working reliable Capture script to be able to Recue someone / add them to your squad must work on Dedi MP as my one does not work for JIP.

_grp = createGroup WEST;
_TAG_pilot = _grp createUnit ["B_Helipilot_F", _pos, [], 0, "FORM"];
_TAG_pilot setCaptive true;
_TAG_pilot allowDamage false;
_TAG_pilot setHit ["hands",1];
_TAG_pilot setHit ["head_hit",0.4];
_TAG_pilot setHit ["body",0.5];
_TAG_pilot playMoveNow "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
_TAG_pilot disableAI "MOVE";
_TAG_pilot disableAI "ANIM";
removeAllWeapons _TAG_pilot;

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  

×