If the hour is even...
jmnevil54
30 May 2021, 18:25If hour/2 gives a remainder of 1, it's odd.
SpawnMonster (this)
}
If hour/2 gives a remainder of 0, it's even.
\\Do nothing
}
How should I do this?
jmnevil54
30 May 2021, 18:30game.hour = game.hour % 2
If result = 1
SpawntMonster (this)
}
RIght?
mrangel
30 May 2021, 18:50Should work. or just:
if (game.hour % 2 = 1) {
SpawnMonster (this)
}
In most programming languages I'm used to, you could just do if (hour % 2) {
, but I think Quest makes you include the =
too.
jmnevil54
30 May 2021, 21:20Looks good! Thank you!