OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: loki72 on 19 May 2008, 04:57:32
-
greetings,
i have a MP mission i want to run on a dedicated server. at the beginning the time is 1400hrs... after a trigger is fired..a blackout occurs and the time fast forwards to 0200hrs.. np.. the problem is all JiP persons see the map at the beginning mission set time.. how do i change the time so it affects the dedicated servers time for all?
global time? only after the trigger is fired... JiP
thanks
-
The following code publish date, overcast and fog levels to any player connecting.
// init.sqf
wantsinfo = objNull;
currentdate = 0;
currentovercast = -1;
currentfog = -1;
if (isServer) then
{
currentovercast = random 0.5;
0 setOverCast currentovercast;
[] spawn
{
while {true} do
{
waitUntil {!isNull wantsinfo};
wantsinfo = objNull;
currentdate = daytime;
publicVariable "currentdate";
currentovercast = overcast;
publicVariable "currentovercast";
currentfog = fog;
publicVariable "currentfog";
};
};
}
else
{
waitUntil {alive player};
wantsinfo = player;
publicVariable "wantsinfo";
waitUntil {currentdate > 0};
skipTime (currentdate - daytime);
waitUntil {currentovercast != -1};
0 setOverCast currentovercast;
Sleep 1;
waitUntil {currentfog != -1};
0 setFog currentfog;
};
-
:D
i don't know which is funnier.. i am starting to see why what you wrote works.. or that you are a scripting master.
it works perfect!
i sure hope you are on the ArmA 2 team...
thank you