Jump to content
Teutch

Invincibility and careless mode to all units only for a moment

Recommended Posts

Hello,

 

I'd like to make a script that makes all vehicles and units on the map indestructible and immortal for a period of 5 minutes

(this should also be the case for those who will spawn after the script is launched, but still within this period of time)

and that ensures that all units are in careless mode, then safe after the 5 minutes.

 

I've make something but it doesn't work, it looks like this :

[
    {

        {
            _x allowDamage false;
            _x setBehaviour "CARELESS";
        } forEach allUnits + vehicles;


        sleep 300;


        {
            _x allowDamage true;
            _x setBehaviour "SAFE";
        } forEach allUnits + vehicles;

    }, [], 0
] call CBA_fnc_waitAndExecute;

 

Any Idea ?

 

Thanks in advance !

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

×