Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: thepsynergist on March 22, 2007, 01:50:21 AM

Title: Day and Night System
Post by: thepsynergist on March 22, 2007, 01:50:21 AM
I used a Day and Night system for my rm2k3 game.  What I wanted was to have a different variation of the overworld music to play based on the time of day.  Every time I try, it constantly restarts.  I used a parallel process on the world map, but I cannot find a way make it play once, and not constantly loop the moment it starts to play.  How do I fix this?

PS, I know it involves switches.
PPS, I use a 90 second wait command for the duration of the time of day.
Title:
Post by: Meiscool-2 on March 22, 2007, 02:51:37 AM
Make two pages. One for if the night switch is on, and one for off.

Make the first page Day, with the night switch off. It should look like:

- Play Midi
-Loop
  - Wait 576075 (random numbers)
- End Loop

Do the exact same thing for the night page.

That easy,
Title:
Post by: thepsynergist on March 22, 2007, 03:06:42 AM
That is simple enough, also when I use it for some reason all of the switches remain on, even when I turn them off.

Code:
<>ChangeSwitch (0001:day) ON
<>Wait 90.0 sec
<>ChangeSwitch (0001:day) OFF
<>ChangeSwitch (0002:dusk) ON
<>Wait 90.0 sec
<>ChangeSwitch (0002:dusk)OFF
<>ChangeSwitch (0003:night) ON
<>Wait 90.0 sec
<>ChangeSwitch (0003:night) OFF
<>ChangeSwitch (0004:dawn) ON
<>Wait 90.0 sec
<>ChangeSwitch (0004:dawn) OFF
<>ChangeSwitch (0001:day) ON

What is the problem?  This code is a parallel process within a common event.

Title:
Post by: thepsynergist on March 23, 2007, 02:23:21 PM
Can someone tell me why all of the switches, as shown above, all turn on at once?  Please?
Title:
Post by: thepsynergist on March 27, 2007, 02:13:12 PM
Never mind, I found the problem.