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

Addaction and passing info

Recommended Posts

I was running a random mission , via a trigger which works well.

nul = ["marker1", 5000] execVM "missions\spawnRandomMissions.sqf";

But now I would like to add this to a civi addaction but not sure how to pass the variable,I thought it would be something like this... but that does not work

this addAction ["Get Intel","inform1.sqf","marker1", 5000]

inform1.sqf

if isserver then {
_source = _this select 0;
_radius = _this select 1;

_mission = switch (floor random(5)) do {
// radio tower stuff 
case 0: {"missions\mission1.sqf"};
// scud launcher stuff
case 1: {"missions\mission2.sqf"};
// suicide bomber stuff
case 2: {"missions\mission3.sqf"};
// suicide bomber stuff
case 3: {"missions\mission4.sqf"};
// suicide bomber stuff
case 4: {"missions\mission5.sqf"};

};

_nul = [_source, _radius] execVM _mission;
};

Share this post


Link to post
Share on other sites

this addAction ["Get Intel","inform1.sqf",[b]["marker1", 5000][/b]]

if isserver then {[b]
_arguments = _this select 3;
_source = _arguments select 0;
_radius = _arguments select 1;[/b]

_mission = switch (floor random(5)) do {
// radio tower stuff 
case 0: {"missions\mission1.sqf"};
// scud launcher stuff
case 1: {"missions\mission2.sqf"};
// suicide bomber stuff
case 2: {"missions\mission3.sqf"};
// suicide bomber stuff
case 3: {"missions\mission4.sqf"};
// suicide bomber stuff
case 4: {"missions\mission5.sqf"};

};

_nul = [_source, _radius] execVM _mission;
};

Share this post


Link to post
Share on other sites

Many thanks works great.

To stop getting lots of mission , how can i take the Addaction off the ? or better still delay them using it again for say 10 min ?

Edited by psvialli
Some more help :)

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  

×