Weather System in Rm2k3

Yuna-chan

Returned from Beyond
  • 858
    Posts
    19
    Years

    Welcome!
    I sat down a second ago and thought, since I have day and night in my game (See Day/Night tut) why not have some random weather as well? I'll explane how to do this step by step, and I'll also explane a simple way to link this with my time event and how to make them start/stop when you enter/exit a building.

    First, this is how you make a common weather event by itself.
    make a common event, name it weather, make it Parallel Process.
    (lets assume you want the weather to change in five minute intervals.)
    Make a variable, name it weather. Also make a switch, name it Weather. now set the Trigger Switch to Weather. Or if you are using the Day/Night event that I posted, just use the same trigger as the Day/Night is using.
    <>Variable Oper: [0005:Weather], Set, Rnd [1-3]
    (this sets the variable weather to a number between 1 and 3, make the 3 higher if you have more than 3 types of weather.)
    <>Branch if Var [0005:Weather] is 1
    <>Weather Effects: None
    <>
    : End
    <>Branch if Var [0005:Weather] is 2
    <>Weather Effects: Rain, Medium
    <>
    : End
    <>Branch if Var [0005:Weather] is 3
    <>Weather Effects: Fog, Medium
    <>
    : End
    <>Wait: 100.0 Sec
    <>Wait: 100.0 Sec
    <>Wait: 100.0 Sec

    Now, say you want a little more kick in your rain. Lets add some lightning!
    Make a switch, name it thunder or lightning.
    make a common event, name it thunder or lightning, make it Parallel Process, and set it's Trigger Switch to the switch you just made.
    <>Flash Screen: {R31,G31,B18,V28}, 1.0 Sec
    <>Shake Screen: Str 5, Spd 5, 2.0 Sec
    <>Wait ?.? Sec (set the numbers to how long you want between each strike.)
    <>Call Event: Thunder (or whatever you named this event.)
    <>

    Now go back to your rain fork you made in the weather event, or make another one and add 1 to the rand if you want a normal rain and a storm.

    <>Branch if Var [0005:Weather] is ? (set this to the rand number)
    <>Weather Effects: Rain, Strong
    <>Switch Operation: [0003:Thunder] On (replace thunder with what you named the switch)
    <>
    : End

    Now in each fork for the other kinds of weather add this line under the Branch line.
    <>Switch Operation: [0003:Thunder] Off
    (this makes sure you won't have thunder while it's clear weather)

    Now, just add this line to all your doors leading into a house or other internal area.
    <>Switch Operation: [0004:Weather] Off
    <>Weather Effects: None
    <>

    Or if you have my Day/Night event, use these lines (could put in a common event and make it call. Then replace this line with a call to that event)
    <>Switch Operation: [0001:Day/Night] Off
    <>Weather Effects: None
    <>Tint Screen: {R100, G100, B100, S100), 0.1 Sec
    <>

    This part is a bit tricky, it checks the variable to see if it's suppose to be raining or fog or whatever and changes it accordingly once you leave a house. Put this in every outgoing door (or in a common event which is call and gets called by each door)
    <>Switch Operation: [0004:Weather] On
    <>Branch if Var [0005:Weather] is 1
    <>Weather Effects: None
    <>
    : End
    <>Branch if Var [0005:Weather] is 2
    <>Weather Effects: Rain, Medium
    <>
    : End
    <>Branch if Var [0005:Weather] is 3
    <>Weather Effects: Fog, Medium
    <>
    : End

    Add a branch if you have more weather types (like the thunder rain)



    (This part is for people with the Day/Night event only!)
    This is where it gets a bit harder, since I messed up while making the Day/Night tut, now we have to put this in each door (or a common event which is call and is called by each outside leading door, which I reccomend doing since this is a bit long.). This makes sure it goes back dark if it's still suppose to be night.

    <>Switch Operation: [0001:Day/Night] On
    <>Branch if Var [0002:Hours] is 12 Less
    <>Tint Screen: {R050,G050,B050,S050}, 0.1 Sec
    <>
    : End
    <>Branch if Var [0002:Hours] is 12 or More
    <>Tint Screen: {R100,G100,B100,S100}, 0.1 Sec
    <>



    Hope you like it.
     
    Very useful for beginners (although I know that already). Great tutorial! :)
     
    Back
    Top