Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Timer help

hello

Member

I was wondering how you would make it so a timer goes on forever for example
you set the timer for 5 mins when the 5 mins are up it restarts back at 5 min

hope I made sense
 
I would say start the timer, then make a different event or flip pages with parallel process and a conditional branch. Make the condition 0 secs or less and when the condition is met, start a new timer. parallel processes run in the background and loop. And if you wanted to keep track of how many times it's looped, you can have it add 1 to a variable everytime the condition is met.
Hope this helps :)
 
hello":3k83mrb5 said:
I want random weather

That ones's a little tougher, and the more detail you go into, the tougher it gets. For example, randomly switching between rain and shine is pretty easy, but throwing fog, thunderstorms, and assorted other oddments in makes it much more complex.
 

Jason

Awesome Bro

Okay for random weather;

Make a new event, call it "Weather" or something, and open it up;

Make a Label, call it "WeatherReset"

Make a variable, call it RandomWeather, and make it's operand be Random 1 - Anything, for this I'll say 20

Now, make a conditional branch like so:

Conditional Branch;
If Variable[RandomWeather] = 1
Set Weather Effect: Rain
Jump to Label: WeatherReset

Now, on the "else" statement, make ANOTHER conditional branch like:

Conditional Branch;
If Variable[RandomWeather] = 2
Set Weather Effect: Snow
Jump to Label: WeatherReset

Now, on the "else" statement, make ANOTHER conditional branch like:

Conditional Branch;
If Variable[RandomWeather] = 3
Set Weather Effect: Storm
Jump to Label: WeatherReset

Now on the "else" statement, just put a;

Set Weather Effect: None
Jump to Label: WeatherReset

Sorry if this seems rushed, but either way it should work for you.
Also, this is untested, so if there's any problems, post them.
 

Jason

Awesome Bro

hello":2gw3vtv8 said:
Either I did it wrong or it dosen't work

Have you set the event to Parallel Process ? If you haven't, try doing that, I'm on a computer with RMXP now anyways so I can test see if it works for me.

Infact,
Try that, and if it doesn't work, post a screenshot of your event or post a demo with it in,

thanks.
 

hello

Member

jbrist":i42wvjdm said:
hello":i42wvjdm said:
Either I did it wrong or it dosen't work

Have you set the event to Parallel Process ? If you haven't, try doing that, I'm on a computer with RMXP now anyways so I can test see if it works for me.

Infact,
Try that, and if it doesn't work, post a screenshot of your event or post a demo with it in,

thanks.

I have a problem, every time I enter the map that has the event it wont let me all it does is play the music for that map but it worked before I added the event

heres the demo anyway
when you start just go up the path or you could walk around

http://www.mediafire.com/?jxqd3jdhmym
 

Jason

Awesome Bro

Okay thanks, I'll take a look now and see what the problem is.

Spotted the error straight away, look at your Control Variable, you set it to "Key To House And Barn", it needs to be set to "Random Weather"

So since I've changed it, it works, however it's a tad laggy due to the labels, so I'll remodel it and send you the demo through PM so you can check it out,

Also just a note, you need to paste the weather event onto every map you want random weather with.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top