Jump to content
Sign in to follow this  
ezremake

Regarding Init & JIP

Recommended Posts

I'm pretty new to editing and scripting in ARMA, and was curious if the full init.sqf runs every time a player connects, or if just the JIP portion of the init.sqf

Here is my init.sqf as an example

// JIP player

if (!isServer && isNull player) then

{

waitUntil {!isNull player};

[] execVM "initTeleportToSL.sqf";

server execVM "revive_init.sqf";

execVM "briefing.sqf";

};

// Run scripts for everyone

server execVM "revive_init.sqf";

execVM "briefing.sqf";

execVM "DynamicWeatherEffects.sqf";

// Random starting time if a server with random start time selected in parameters

if isserver then {

private "_t";

_t = paramsarray select 0;

if (_t == 99) then { _t = random 24 };

skiptime ((_t - daytime + 24) % 24);

};

// Day and night cycle

if(not isNil "paramsArray") then{

[paramsArray select 1] spawn {

_skipspeed = (_this select 0)/2;

while{_skipspeed > 0} do{

sleep 0.5;

skipTime(_skipspeed/3600);

};

};

};

0 cutText ["", "BLACK FADED"];

if(true) exitWith {};

If someone JIP will only the (!isServer && isNull player) portion run, or the whole thing? If the whole thing runs, essentially I'd be running these other scripts twice.

Also, if the full init.sqf runs every time, how would you go about predefining public variables without them being reset every time?

Share this post


Link to post
Share on other sites

Whole thing is run.

pubVars:

if (isNil "mypubvar") then {//predefine
mypubvar = "predefined";
};

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  

×