PDA

View Full Version : How to use parameters in MP and apply them correctly with variables?



alleycat
Jan 20 2010, 20:47
I want to have selectable difficulty levels in my mp mission. I have setup the selectable parameters, however when it comes to applying them in the mission, it does not work.

Basically I want, depending on what level is selected, specific units to appear.



init.sqf

diff_level = 0

timeparam = (paramsArray select 0);
if (timeparam == 0) then {diff_level = 0};
if (timeparam == 1) then {diff_level = 1};
if (timeparam == 2) then {diff_level = 2};



There are 3 units, each has one of this in the condition:
diff_level >= 0
diff_level >= 1
diff_level >= 2

JW Custom
Jan 21 2010, 14:15
The param arrays goes into the description.ext.

Here's a simple example doing what you are trying to do:
http://www.filefactory.com/file/a2d9ag8/n/parameters.utes.zip

If you select EASY 1 patrol will appear, NORMAL 2 patrols & HARD 3 patrols.

alleycat
Jan 21 2010, 23:10
Very useful, and put to use in this mission:
http://forums.bistudio.com/showthread.php?t=94140