OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Blacknite on 02 May 2010, 01:02:35

Title: Day/Night Effects
Post by: Blacknite on 02 May 2010, 01:02:35
I figured out how to make it Day/Night, but only works in client, but doesnt make the effect for server.  How do I do that?
Title: Re: Day/Night Effects
Post by: Inkompetent on 02 May 2010, 02:44:02
You'll have to run the skipTime or setDate command on the server as well. Not sure if setDate is local or global though, but skipTime is local and thus only changed on the machine that runs the command.

One way to get around the troubles of broadcasting commands across the network could be createUnit (http://community.bistudio.com/wiki/createUnit) a gameLogic with the skipTime command in its init line.

If you want to set the time at mission start you can simply process the setDate or skipTime in the init.sqf outside of any isServer or isPlayer checks.
Title: Re: Day/Night Effects
Post by: kju on 02 May 2010, 07:26:15
setDate is global. Only execute it on the server.