Jump to content
Sign in to follow this  

Param from Description.ext in Min, Mid and Max of trigger.

Recommended Posts

So, I am trying to create a trigger that gets triggered at a time defined in the mission parameters (The ones the host can select in the mission screen).

I have my mission parameters in description.ext as follows:

class Params

class Duration
	title = "$STR_mp_param_duration";
	values[] = {600,1200};
	texts[] = {"10 Minutes","20 minutes"};
	default = 1;


Then in the trigger on the mission, for the Min, Mid and Max I have

paramsArray select 0;

As I am new to scripting for A2, I have no clue what is going on. Any help would be appreciated :)

Share this post

Link to post
Share on other sites


Only thing I see right now is your default value. It should be 600 or 1200 (one of the values in the values[] array). If you do not set it explicitly, and default value is 1 as in your example, I guess the current paramsArray value will be undefined. And also, the paramsArray is not accessible in SP mode (when you preview from editor). It is only accessible in MP, unless you code for it.

There is a code snippet that enables paramsArray in SP mode. Look at this thread:


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