DarkMage31
RM2K(3) Master
- 1,981
- Posts
- 21
- Years
- None of your beeswax!
- Seen Nov 24, 2007
Here's a tutorial I wrote for someone today based on how I did day/night in Lunar.
Open: Database>Common Events
Go To: Array Size (lower left corner)
Increase the number by 2
Hit Okay
Enter the name of the event as:
Under Trigger select Parallel Process
Check: Trigger Switch and then press the |...| button
Make a new switch and call it:
Begin Coding:
The bold command sets how long a "Day" will be. It is 15 minutes in this model. The red statement requires a switch that has not yet been made. Make it :). The turquoise statement is optional. That variable keeps track of how many "days" you have been playing.
[The above is just code as it should appear in RPG Maker 2003 translated by RPG Advocate. If you are unsure of how to do any of those commands, please let me know]
That's the end of the common event.
Under Trigger select Parallel Process
Check: Trigger Switch and then press the |...| button
Select the switch [0004:Day] that you made in the red command in the previous code.
Begin Code:
Hit Okay, and you're done! Now let's make the part of the oak intro where he asks if it's day or night. Basically, just a Show Choice.
I know it seems weird, but I got those switches right. The reason is, if you want to make it Day time, you go from night to day, so by turning on night, you transition to day. And vice versa also.
That's it! You've got a working Day/Night system!
Open: Database>Common Events
Go To: Array Size (lower left corner)
Increase the number by 2
Hit Okay
Enter the name of the event as:
Meaning "from Night to Day."Night>Day
Under Trigger select Parallel Process
Check: Trigger Switch and then press the |...| button
Make a new switch and call it:
[It will for the purposes of this tutorial be in the fifth slot, and will thus be referenced as [0005:Night]]Night
Begin Coding:
Code:
<>Branch if Timer 1 is 0M 00S Less/Equal
-<>Tint Screen: (R100,G100,B100,S100), 0.3 Sec
-<>Timer 1 Operation: Set, 15M 00S
-<>Switch Operation: [0004:Day] ON
-<>Timer 1 Operation: Start
-<>Switch Operation: [0005:Night] OFF
-<>Variable Oper: [0111:Day Count] + , 1
-<>
:End
<>
[The above is just code as it should appear in RPG Maker 2003 translated by RPG Advocate. If you are unsure of how to do any of those commands, please let me know]
That's the end of the common event.
Hit Apply
Select a new common event from the list on the left. Enter the name of the event as:
Meaning "from Day to Night."Day>Night
Under Trigger select Parallel Process
Check: Trigger Switch and then press the |...| button
Select the switch [0004:Day] that you made in the red command in the previous code.
Begin Code:
Code:
<>Branch if Timer 1 is 0M 0S Less/Equal
-<>Tint Screen: (R070,G070,B090,S100), 0.3 Sec
-<>Timer 1 Operation: Set, 15 M 00S
-<>Switch Operation: [0005:Night] ON
-<>Timer 1 Operation: Start
-<>Switch Operation: [0004: Day] OFF
-<>
:End
<>
Code:
<>Show Choices: Day/Night
: [Day] Handler
-<>Message: It's day time!
-<>Switch Operation: [0005:Night] ON
-<>
: [Night] Handler
-<>Message: It's night time!
-<>Switch Operation: [0004:Day] ON
<>
: End
That's it! You've got a working Day/Night system!