Jump to content
Sign in to follow this  
JacobJ

How do I check if something was selected or not in the parameters?

Recommended Posts

Hey all

I have a point/rating system in my mission and it can be set to "Off" or "On" in the parameters in the lobby. Off does nothing and On runs a script that activates the point-system.

Now, I want to check if this was On or Off at the end of the game. If it was off there would not be created a task saying what points you have got. If it was set to ON I would like to display the points in the debriefing screen.

Can I somehow check if a script has been executed or can I refer to the "On"/"Off" or maybe their values 1/2?

/Jacob

//Til Pointsystem
switch (paramsarray select 5) do {
 case 1: { nul = [] execVM "points.sqf"};
 case 2: {};
};

class pntsystem	{

	title = "Point-system";
	values[] = {1,2};
	default = 2;
	texts[] = {"On", "Off"};
	};

Share this post


Link to post
Share on other sites

if (paramsarray select 5 == 1) then { // on

if (paramsarray select 5 == 2) then { // off

Share this post


Link to post
Share on other sites

That simple... hmm I doesnt seem to have understood what refers to what. Thank you very much!

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  

×