Day and Night duration

Status
Not open for further replies.
Level 4
Joined
Nov 19, 2009
Messages
78
hello again :)

title says all.... how do i use the editor (still using the regular one, fulfilled all my needs so far :) ), to alter the lenght of days and nights ?

i.e. to get a longer night than day or vice versa

thanks
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Those first 3 are not editable during the game, but the fourth one is.
JASS:
SetTimeOfDayScale(real)
if you have the 4th option (from above) set to, for example 500, and you do:
JASS:
call SetTimeOfDayScale(0.50)
then a day will take 1000 real time seconds
 
Level 4
Joined
Nov 19, 2009
Messages
78
thank you all very much !

@Yixx + @MortAr-
can you please elaborate on the white text ?

how do i insert it ? and where ?
i didnt found any trigger like it !

quote:
,,if you have the 4th option (from above) set to, for example 500, and you do:
call SetTimeOfDayScale(0.50)
then a day will take 1000 real time seconds''

can you please tell me, where exactly do i put those texts ?
so far, i ve only been using the normal triggers and such ....

thank you all alot
 
Level 9
Joined
Dec 12, 2007
Messages
489
Isn't 0.50 = 50? I think it should be 5.00.
i believe Yixx is right, if the real seconds per game day is set to 500 and the timeofday scale is set to 0.50 , it will result in each day in-game = 1000 real-time seconds.

that white text is JASS...
JASS:
call SetTimeOfDayScale(.50)
this is equivalent with
  • Game - Set time of day speed to 50.00% of the default speed
 
Level 4
Joined
Nov 19, 2009
Messages
78
Much appreciated !

i just tried it now. ...BUT

1) when i convert a empty trigger to custom text and use your text ( copy/ paste) at save, it says it has errors and disables it !
how would the JASS look like ?

2) i think i was abit unclear about what i was looking for .... in a 24 hour time frame, i want the Night to be 18 hours and day time to be 6 hours :)
how would the full trigger look like in JASS now ? :)

i m digging up on net in the mean time, maybe i find out
if i do..it ll be posted here in full

thank you
 
Level 9
Joined
Dec 12, 2007
Messages
489
.... in a 24 hour time frame, i want the Night to be 18 hours and day time to be 6 hours
ehm.... from what I remember, we can't set how many hours spent in-game for a night and a day...
it will always be 12 hours of day, and 12 hours of night...
but we can change how long these 12 hours of day and night in Gameplay Constants, not in trigger editor... so in other words, it can't be edited via triggers I suppose....

1) when i convert a empty trigger to custom text and use your text ( copy/ paste) at save, it says it has errors and disables it !
how would the JASS look like ?
post your trigger please :grin:
 
Level 5
Joined
Jul 31, 2005
Messages
105
Just use custom gameplay constants like the first guy said, and set the time that Dusk starts 6 hours after dawn starts (in this case you can just put Dusk at 12). What the other guys are saying is you can change how fast in game time goes by while the game is going on.
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Just use custom gameplay constants like the first guy said, and set the time that Dusk starts 6 hours after dawn starts (in this case you can just put Dusk at 12). What the other guys are saying is you can change how fast in game time goes by while the game is going on.

The problem with this method is that the warcaft UI will not change, so it will look like it's day, while it's actually night (or vice versa).
e.g.: you set "Dawn" to 10 'o clock, when it's 6 'o clock, the warcraft UI will go to dawn (the sun will rise, the color will change to yellow and it will play the sound), while the vision and night/day-abilities are still set to "Night" this may cause some confusion for the players.

I believe I've already given him enough information in a map I have sent him (2 days ago) on how to do this... with triggers.
(It's a small test-map where you can change the length of day/night with items - if you use "Dayrise", for example, the day will last 50% longer and the night will be 50% shorter).
 
Level 4
Joined
Nov 19, 2009
Messages
78
yes...thanls apo
i posted this BEFORE getting your map

as i m writting this, i m trying to incorporate your brilliant neutral to aggresive system into my map

but concerning your day to night way:
though nice, i would like for the shift in speed ( faster day/ slower night etc) to ocur as naturally as the regular time speed, WITHOUT any interference from the player

is that possible ? :D
an automated script to make night 2 x slower than daylight, and daylight 2 x faster than night ( to compensate so the overall duration and speed is the same, to avoid confusions like described above)
 
Level 9
Joined
Dec 12, 2007
Messages
489
  • Day Duration
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (In-game time of day) Greater than or equal to 6.00
          • (In-game time of day) Less than 18.00
        • Then - Actions
          • -------- if it is day --------
          • Game - Set time of day speed to 200.00% of the default speed
        • Else - Actions
          • -------- if it is night --------
          • Game - Set time of day speed to 50.00% of the default speed
something like this?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Day Duration
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (In-game time of day) Greater than or equal to 6.00
          • (In-game time of day) Less than 18.00
        • Then - Actions
          • -------- if it is day --------
          • Game - Set time of day speed to 200.00% of the default speed
        • Else - Actions
          • -------- if it is night --------
          • Game - Set time of day speed to 50.00% of the default speed
something like this?

This is actually better: (doesn't stress the game with a periodic event)

  • Day Night
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Wait 1.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (In-game time of day) Greater than or equal to 6.00
          • (In-game time of day) Less than or equal to 7.00
        • Then - Actions
          • Game - Set time of day speed to DayNightDur[1]% of the default speed
        • Else - Actions
          • Game - Set time of day speed to DayNightDur[2]% of the default speed
though nice, i would like for the shift in speed ( faster day/ slower night etc) to ocur as naturally as the regular time speed, WITHOUT any interference from the player
In that case, all you have to do is delete the second day/night-trigger and set the DayNightDur[X] to the correct values... I thought you understood that xD my bad :)
 
Level 4
Joined
Nov 19, 2009
Messages
78
thank you all alot ! :)

now i got another idea :D

during daylight, alongside faster flowing time, i also wanted to add a custom enviromental effect ( sun shine rays of light )

during nightime, alongside slower time, i also want to add a custom enviromental effect ( moonlight rays of light )

however, just adding the effect to trigger wont work :(
i m now experiementing with separate triggers .... but not much luck

any pointers ? :D
thanks alot all
 
Status
Not open for further replies.
Top