Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • WAY easy day to dusk to night tut
« previous next »
  • Print
Pages: [1]

Author Topic: WAY easy day to dusk to night tut  (Read 3361 times)

Offline Greeniviedude

  • Member
  • Initiate
  • *
  • Posts: 15
  • Coollll
WAY easy day to dusk to night tut
« on: July 01, 2007, 03:33:09 AM »
Be warned I had to code a lot and I am just going to write it out, since it's quite large I am not explaining it. It uses extremely simple commands and if you deserve to use RM2k3 you should understand it, lol. Well here goes then!

Ok I had to put these together because of some of the features this has. The main one when it changed from light to dark when it rains and the switches that are required. So here is your code - Beware there may be some bugs but I had no known problems(may want to readjusts times since I am using small time limits for testing purposes!)

I won't be using the <> since everyone knows where they go :P

- You should put this code into a common event called Day/Night!
- The Common Event has to be a Parallel Process and has to be called on a map by an Event Tile(make an event tile and add the code - Call Event: Day/Night)
- Also make the variables: day, night, dusk, dawn, and weather.

Switch Operation: [0001:day] ON
Wait: 60.0 Sec
Tint Screen: (R100,G070,B040,S120), 30.0 Sec (Wait)
Switch Operation: [0001:day] OFF
Switch Operation: [0002:dusk] ON
Wait: 60.0 Sec
Tint Screen: (R020,G040,B080,S120), 30.0 Sec (Wait)
Switch Operation: [0004:dusk] OFF
Switch Operation: [0002:night] ON
Wait: 60.0 Sec
Tint Screen: (R080,G080,B100,S100), 30.0 Sec (Wait)
Switch Operation: [0002:night] OFF
Switch Operation: [0002:dawn] ON
Wait: 60.0 Sec
Tint Screen: (R100,G100,B100,S100), 30.0 Sec (Wait)
Switch Operation: [0003:dawn] OFF
Switch Operation: [0001:day] ON

- This next bit of code goes into the common event Random Rain
- The Common Event has to be a Parallel Process and has to be called on a map by an Event Tile(make an event tile and add the code - Call Event: Random Rain)

Wait: 60.0 Sec
Variable Oper: [0001:weather] Set, Rnd [0-7]

Branch if Var [0001:weather] is 1
Weather Effects: Rain, Weak
Branch if Switch [0002:night] is OFF
Tint Screen: (R020,G040,B080,S120), 30.0 Sec (Wait)

: Else Handler

: End
Wait 10.0 Sec
Weather Effects: Rain, Medium
Wait 10.0 Sec
Weather Effects: Rain, Strong
Wait 60.0 Sec
Weather Effects: Rain, Medium
Wait 10.0 Sec
Weather Effects: Rain, Weak
Wait 10.0 Sec
Branch if Switch [0002:dawn] is ON
Tint Screen: (R080,G080,B100,S100), 30.0 Sec (Wait)

: End
Branch if Switch [0002:day] is ON
Tint Screen: (R100,G100,B100,S100), 30.0 Sec (Wait)

: End
Branch if Switch [0002:dusk] is ON
Tint Screen: (R100,G070,B040,S120), 30.0 Sec (Wait)

: End
: End

Branch if Var [0001:weather] is 2
Weather Effects: Rain, Weak
Branch if Switch [0002:night] is OFF
Tint Screen: (R020,G040,B080,S120), 30.0 Sec (Wait)

: Else Handler

: End
Wait 10.0 Sec
Weather Effects: Rain, Medium
Wait 10.0 Sec
Weather Effects: Rain, Strong
Wait 60.0 Sec
Wait 60.0 Sec
Weather Effects: Rain, Medium
Wait 10.0 Sec
Weather Effects: Rain, Weak
Wait 10.0 Sec
Branch if Switch [0002:dawn] is ON
Tint Screen: (R080,G080,B100,S100), 30.0 Sec (Wait)

: End
Branch if Switch [0002:day] is ON
Tint Screen: (R100,G100,B100,S100), 30.0 Sec (Wait)

: End
Branch if Switch [0002:dusk] is ON
Tint Screen: (R100,G070,B040,S120), 30.0 Sec (Wait)

: End
: End

Branch if Var [0001:weather] is 3
Weather Effects: Rain, Weak
Branch if Switch [0002:night] is OFF
Tint Screen: (R020,G040,B080,S120), 30.0 Sec (Wait)

: Else Handler

: End
Wait 10.0 Sec
Weather Effects: Rain, Medium
Wait 10.0 Sec
Weather Effects: Rain, Strong
Wait 60.0 Sec
Wait 60.0 Sec
Wait 60.0 Sec
Wait 60.0 Sec
Weather Effects: Rain, Medium
Wait 10.0 Sec
Weather Effects: Rain, Weak
Wait 10.0 Sec
Branch if Switch [0002:dawn] is ON
Tint Screen: (R080,G080,B100,S100), 30.0 Sec (Wait)

: End
Branch if Switch [0002:day] is ON
Tint Screen: (R100,G100,B100,S100), 30.0 Sec (Wait)

: End
Branch if Switch [0002:dusk] is ON
Tint Screen: (R100,G070,B040,S120), 30.0 Sec (Wait)

: End
: End

Branch if Var [0001:weather] is 4

:End

Branch if Var [0001:weather] is 5

:End

Branch if Var [0001:weather] is 6

:End
Logged
God sent Life,
Satan sent coke.

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
(No subject)
« Reply #1 on: July 01, 2007, 06:06:40 AM »
Yeah thatīs pretty good and simple. Good job.

I might just copy it...
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline Greeniviedude

  • Member
  • Initiate
  • *
  • Posts: 15
  • Coollll
thx
« Reply #2 on: July 01, 2007, 07:00:36 PM »
thx but what do u mean by copy it?
Logged
God sent Life,
Satan sent coke.

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
(No subject)
« Reply #3 on: July 01, 2007, 07:10:55 PM »
Iīll copy it and use it in my game of course.
I might just have some use of it.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline Desimodontidae

  • Registered July 13, 2004, 10:41:19 AM (+1692 post counts)
  • Agent
  • *
  • Posts: 892
  • ghost host
    • perpetual massacre
(No subject)
« Reply #4 on: July 01, 2007, 08:55:38 PM »
Cool. Wouldn't it work if you had 3 common events (parallel processed) and made the first one called by switch "day" or whatever, have its event like

-wait 60 sex
-tint screen (whatever colors, 30 sex)
-change switch [day: 0ff]
-change switch [dusk: On]

and then make the other one just like that except make it called by "dusk"

-wait 60 sex
-tint screen (whatever colors, 30 sex)
-change switch [dusk: 0ff]
-change switch [night: On]

and so fourth. You can add more, too. Of course, remember to actually turn the "day" switch on by another event somewhere.

And weather, I'd make 3 more common events (each one called by a different time of day (duh)) and then make something like

-set variable [weather]: random number between 1-4
-branch if [weather] is 1
--no rain
-branch if [weather] is 2
--rain weak
-branch if [weather] is 3
--rain med
-branch if [weather] is 4
--rain strong
-end
-end... etc
-wait (however long till you want weather to change)

Or you could make it like 1-8 or whatever and make most of en "no rain" if you want it to not occur a lot. Or vise versa if you do. Also, you can put change colours and stuff up there to make the day all grey and shit.

Yes. It would work.
Logged
My MGS3 main character sprites

Offline Greeniviedude

  • Member
  • Initiate
  • *
  • Posts: 15
  • Coollll
Thx
« Reply #5 on: July 02, 2007, 01:04:38 AM »
thx for the improve.
this was my first tut i mean i just started making rpgs and about 2 weeks later i was like. hmm would this work with that and stuff
and it was like saying hmmm 2+2=4+3=7 and it all worked out so yea it has some improvements so.
Logged
God sent Life,
Satan sent coke.

Offline Yhtomitsu

  • The One to break through the Darkness
  • Associate
  • *
  • Posts: 255
  • I love to work on games and test games.
(No subject)
« Reply #6 on: July 02, 2007, 05:40:01 AM »
an easy to read understand tutorial good work espically for your first one good work and keep it up
Logged
Agenta's Website come go there to follow the story of rise of the pheonix and find out what other games agenta has on the way:
http://www.freewebs.com/yhtomitsu/

<img src="http://img482.imageshack.us/img482/5611/shadowcopyzz5.jpg" width="320" height="120 alt="http://img482.imageshack.us/img482/5

Offline Desimodontidae

  • Registered July 13, 2004, 10:41:19 AM (+1692 post counts)
  • Agent
  • *
  • Posts: 892
  • ghost host
    • perpetual massacre
(No subject)
« Reply #7 on: July 02, 2007, 06:38:03 PM »
Quote
Originally posted by Greeniviedude
thx for the improve.
this was my first tut i mean i just started making rpgs and about 2 weeks later i was like. hmm would this work with that and stuff
and it was like saying hmmm 2+2=4+3=7 and it all worked out so yea it has some improvements so.


Well that just came off the top of my head... if anything it just saves more space...
Logged
My MGS3 main character sprites

Offline A Forgotten Legend

  • Your neighborhood box of colors
  • Royal
  • *
  • Posts: 4,428
    • Website
(No subject)
« Reply #8 on: July 05, 2007, 06:50:25 PM »
I'm working on something similar, only, mine has a season system as well.
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • WAY easy day to dusk to night tut
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum