Jump to content
Sign in to follow this  
wiggum2

taskDefend.sqf

Recommended Posts

I used this function like this...

campGuard.sqf

_units = 8 + random 2;
_grp = [(getMarkerpos "Markername"),[color="Red"]east[/color],_units] call BIS_fnc_spawngroup;
[_grp, (getMarkerpos "Markername")] call BIS_fnc_taskDefend;

It spawns a group with 8-10 east units on a marker position. The group defends a marker position and man nearby static defenses like MG and so on. Patroling, sit down, and attack enemy units if they are spotted.

Share this post


Link to post
Share on other sites

I can never get taskdefend to work. The group never mans static weapons or takes up defensive positions, they just sit around. Thanks for this script I'll give this a try.

Share this post


Link to post
Share on other sites

I'm digging out this post because I've noticed that this functions doesn't seem to work in MP. If I put in a trigger nul = [] execVM "campGuard.sqf" , it work fiine in solo , but nothing happens in MP. I've tried to launch the script from the init.sqf, I've checked everything I could , but It looks like function just don't work in MP is it normal ?

Share this post


Link to post
Share on other sites

Maybe you must right at first in the script:

if (isserver) then {

_units = 5 + Random 3;
_grp = [(getMarkerpos "defendpos"),east,_units] call bis_fnc_spawngroup;
[_grp, (getMarkerpos "defendpos")] call BIS_fnc_taskDefend;

};

Share this post


Link to post
Share on other sites

:o yes it works.

But I must not have understood the way MP swripting works. I thought that if I didn't wrote the if(isserver)then {... the script would just exec once per client.

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  

×