Jump to content
Sign in to follow this  
Egosa-U

Define Weaponselection with lobby parameters

Recommended Posts

Hi.

I am trying to sort out how to use the lobby-parameters as a tool to ease up my coop-mission.

I'd like to select between 2 options: Normal and easy-mode.

In the normal-mode the players should only be able to choose between 3 non-scoped weapons and in the easy mode, some more weapons can be chosen.

I tried to get this to work but cant figure out how to setup the weapons? How do i have to edit that part what I underlined in the following code:

titleParam1 = "Difficulty:"; valuesParam1[] = {[u]0,1[/u]};
defValueParam1 = 1;
textsParam1[] = {"Easy", "Normal", };

And please dont tell me, i should use two missionfiles - that would be the option I want least..

Thnx in advance for any help.

Share this post


Link to post
Share on other sites

Hi there,

Paste the following into your Description.ext file in your mission root folder (Create the file if you dont have one already)

class Params
{
class dificulty
{
	title = "Dificulty";
	values[] = {0, 1};
	texts[] = {"Easy", "Normal"};
	default = 0;
};
};

Then, on your init.sqf file (Create one if you dont have one already)

switch (paramsArray select 0) do
{
case 0 : { ...code... };  //In case players choose easy
case 1 : { ...code... };  //In case players choose Normal
};

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  

×