Jump to content
Sign in to follow this  
callihn

Need help with paramsarray

Recommended Posts

I have searched and worked on these for hours now and I'm just missing something. I have three things that I know are not working, time of day, weather and fasttime, others like number of objectives are obviously hard to test, if you see what I'm doing wrong I could really use some help.

description.ext:

class Params {
class MainTargets {
	title = "Main Targets";
	#ifdef __DEFAULT__
	values[] = {2,4,6,8,10,12,14,16,17};
	default = 17;
	texts[] = {"Random 2","Random 4","Random 6","Random 8","Random 10","Random 12","Random 14","Random 16","Random 17"};
	#endif

	#ifdef __TT__
	values[] = {2,4,6,8,10,12,14,16,17};
	default = 17;
	texts[] = {"2","4","6","8","10","12","14","16","17"};
	#endif

	#ifdef __EVERON__
	values[] = {2,4,6,8,10,12,14,16,17};
	default = 17;
	texts[] = {"2","4","6","8","10","12","14","16","17"};
	#endif
};

class TimeOfDay {
	title = "Time of day:";
	values[] = {7,19,};
	default = 7; 
	texts[] = {"Day","Night"};
	code = "setDate [2010, 2, 22, %1, 0]";
};

class Weather {

	title = "Weather";
	values[] = {1,2,3,4};
	default = 2;
	texts[] = {"Clear", "Stormy", "Cloudy", "Foggy"};
};

class WithMHQTeleport {
	title = "Teleport or spawn at MHQ:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"Yes","No"};
};

class FastTime {
	title = "Fast time (1 sec ~ 1 minute):";
	values[] = {0,1};
	default = 1; 
	texts[] = {"Yes","No"};
};

class HALOWaitTime {
	title = "HALO at base wait time:";
	values[] = {0,300,600};
	#ifndef __TT__
	default = 0; 
	#else
	default = 0;
	#endif
	texts[] = {"0 Minutes","5 Minutes","10 Minutes"};
};

class LockArmored {
	title = "Lock armored enemy vecs:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"Yes","No"};
};

class LockCars {
	title = "Lock enemy cars:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"Yes","No"};
};

class LockAir {
	title = "Lock enemy air vecs:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"Yes","No"};
};

class WithRepStations {
	title = "Repair buildings can repair:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"Yes","No"};
};

class WithJumpFlags {
	title = "No parachute jump flags:";
	values[] = {0,1};
	default = 1; 
	texts[] = {"Yes","No"};
};

class ParaAtBase {
	title = "Parachute from base:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"Yes","No"};
};

class AmmoBoxHandling {
	title = "Ammobox handling:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"New","Old"};
};

class VecCreateWaitTime {
	title = "MHQ vec creation time:";
	values[] = {60,300,600};
	default = 300; 
	texts[] = {"1 Minute","5 Minutes","10 Minutes"};
};

class AutoKickTime {
	title = "Air vecs autokick time:";
	values[] = {0,60,300};
	default = 0; 
	texts[] = {"0 Minute","1 Minute","5 Minutes"};
};

class HALOJumpHeight {
	title = "HALO jump height:";
	values[] = {500,700,888,1000,2000};
	default = 500; 
	texts[] = {"500 m","700 m","888 m","1000 m","2000 m"};
};

class WithBackpack {
	title = "With backpack:";
	values[] = {0,1};
	default = 0; 
	texts[] = {"Yes","No"};
};

class LimitedWeapons {
	title = "Weapons limited:";
	values[] = {0,1};
	default = 1; 
	texts[] = {"Yes","No"};
};

#ifndef __RANKED__
class WithRanked {
	title = "Ranked:";
	values[] = {0,1};
	default = 1; 
	texts[] = {"Yes","No"};
};
#endif
};

init.sqf:

Weather = (paramsarray select 2);
if ( Weather ==	1) then {
		0 setFog 0;
		0 setOvercast 0;
		0 setRain 0;
};
if ( Weather ==	2) then {
		0 setFog 0.2;
		0 setOvercast 1.0;
		0 setRain 1;
};
if ( Weather ==	3) then {
		0 setFog 0;
		0 setOvercast 0.7;
		0 setRain 0;
};
if ( Weather ==	4) then {
		0 setFog 0.7;
		0 setOvercast 0.7;
		0 setRain 0;
} else {
		0 setFog 0.2; 
		0 setOvercast 1.0;
		0 setRain 1;
	};
};

if (d_with_fast_time) then {
	execFSM "fsms\FastTime.fsm";
};

i_common.sqf:

if (isNil "paramsArray") then {
number_targets = 17;
d_with_mhq_respawn = true;
d_with_fast_time = false;
d_para_timer_base = 0;
// if set to true, enemy AI spawned vehicles will be locked. Default false, no lock
d_lock_ai_armor = true;
d_lock_ai_car = true;
d_lock_ai_air = true;
// Set it to false if you have performance problems (short hickups) at mission start.
// If false repair stations can not repair vehicles
d_with_repstations = true;
// If set to true no parachute flags (Choose Parachute location) will get created at base and cleared main targets (only available for version != AI)
// this also overrides d_para_at_base and sets it to false
d_no_para_at_all = false;
// "Choose Parachute Location" option at the flag at base
d_para_at_base = true;
// set d_old_ammobox_handling to true to get back pre 3.50 ammobox dropping from mhq and choppers
d_old_ammobox_handling = false;
// if a player creates a vehicle at a mhq this is the time he has to wait until the old vehicle gets deleted
// and he is able to create a new vehicle again. Default is 30 minutes = 1800 seconds
d_remove_mhq_vec_time = 300;
// default = 1800. This will kick players for the first 30  minutes(or 1800 seconds) when they joined out of air vehicles that can be won at main targets or sidemissions
// if you don't want this feature then set d_player_air_autokick = 0;
// if ArmA crashes and the player rejoines then he won't need to wait 30 minutes again (time gets saved)
d_player_air_autokick = 0;
// set the height for the HALO jump
d_halo_height = 500;
// add backpack feature
d_use_backpack = true;
d_limited_weapons = false;
#ifndef __RANKED__
d_with_ranked = false;
#endif

} else {

number_targets = paramsArray select 0;
d_with_mhq_respawn = paramsArray select 3;
d_with_fast_time = paramsArray select 4;
d_para_timer_base = paramsArray select 5;
d_lock_ai_armor = if ((paramsArray select 6) == 1) then {false} else {true};
d_lock_ai_car = if ((paramsArray select 7) == 1) then {false} else {true};
d_lock_ai_air = if ((paramsArray select 8) == 1) then {false} else {true};
d_with_repstations = if ((paramsArray select 9) == 1) then {false} else {true};
d_no_para_at_all = if ((paramsArray select 10) == 1) then {false} else {true};
d_para_at_base = if ((paramsArray select 11) == 1) then {false} else {true};
d_old_ammobox_handling = if ((paramsArray select 12) == 0) then {false} else {true};
d_remove_mhq_vec_time = paramsArray select 13;
d_player_air_autokick = paramsArray select 14;
d_halo_height = paramsArray select 15;
d_use_backpack = if ((paramsArray select 16) == 1) then {false} else {true};
d_limited_weapons = if ((paramsArray select 17) == 1) then {false} else {true};
#ifndef __RANKED__
d_with_ranked = if ((paramsArray select 18) == 1) then {false} else {true};
#endif
};

That's not all those files contain, but I'm trying to keep it as relevant as I can for you, if you need something specific from that just ask.

I'm becoming quite frustrated, this is all I have left to do and I can't seem to overcome it, can someone show me the way please?

Share this post


Link to post
Share on other sites

Nevermind, I give up, since I can set the defaults I guess there is no real need for this anyway.

Edited by callihn

Share this post


Link to post
Share on other sites

No! Dont give up! Only need the AI skills params, anyone who knows the commands in the init and the description.ext please?

Share this post


Link to post
Share on other sites

Search for skipTime in the original files for how and when timeofday (and fasttime, but I don't use this myself) is handled (several places). Search for setOvercast and setFog (and setRain and setWind?) for the weather thing. This is also set several places. Remember to search * all files, not just *.sqf, as some uses may be inside fsms.

Edit: Oh crap. Really old thread that one :p

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  

×