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

LOCK vehicles when using BIS_fnc_spawnGroup

Recommended Posts

Hi Guys,

I am using the following to spawn some armour in , but not sure how I can lock the vehicles ?

_grp1 = [getMarkerPos "taskarmour1", east,["T72_MOL", "BMP2_MOL","ibr_T55"]] call BIS_fnc_spawnGroup;

Can somone please let me know how I can lock them all

Thanks

Share this post


Link to post
Share on other sites

Thanks for the reply but having a problem , I now get nothing if i add that to the end ?

armour1.sqf

_grp2 = [getMarkerPos "taskarmour2a", east,["T72_MOL", "BMP2_MOL","ibr_T55","Ural_MOL"]] call BIS_fnc_spawnGroup;
[(units _grp2) select 0, "marker_t2a","random","nofollow","spawned"] execVM "scripts\upsmon.sqf";
{ lock vehicle _x } forEach units _grp2;

_grp21 = [getMarkerPos "taskarmour2b", east,["ibr_T55", "BMP2_MOL","ibr_T55"]] call BIS_fnc_spawnGroup;
[(units _grp21) select 0, "marker_t2b","random","nofollow","spawned"] execVM "scripts\upsmon.sqf";
{ lock vehicle _x } forEach units _grp21;

Edited by psvialli

Share this post


Link to post
Share on other sites

try this, also i placed the lock procedures before UPSMON, to make sure UPSMON does not f*** anything up.

_grp2 = [getMarkerPos "taskarmour2a", east,["T72_MOL", "BMP2_MOL","ibr_T55","Ural_MOL"]] call BIS_fnc_spawnGroup;
{if (!(vehicle _x isKindOf "Man") AND !(locked vehicle _x)) then {vehicle _x lock true;};} forEach units _grp2;
[(units _grp2) select 0, "marker_t2a","random","nofollow","spawned"] execVM "scripts\upsmon.sqf";

_grp21 = [getMarkerPos "taskarmour2b", east,["ibr_T55", "BMP2_MOL","ibr_T55"]] call BIS_fnc_spawnGroup;
{if (!(vehicle _x isKindOf "Man") AND !(locked vehicle _x)) then {vehicle _x lock true;};} forEach units _grp21;
[(units _grp21) select 0, "marker_t2b","random","nofollow","spawned"] execVM "scripts\upsmon.sqf";

Edit: i thought i should maybe explain the change i did:

what you were trying to do was to lock all units in group.

wich is the men/man units in group, here i select only vehicle of man (that is the vehicle itself when man is inside) and check if its locked, if its not a man, and not locked, then lock it.

edit2: tested, did not work, updated code, works now.

---------- Post added at 04:40 PM ---------- Previous post was at 04:02 PM ----------

updated lock code line, it works now.

Edited by Demonized

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  

×