[Trigger] Random Weather Changes

Status
Not open for further replies.
Level 6
Joined
Oct 5, 2012
Messages
86
Hey, I wanted to involve a "weather-change" in my new map. But because I don't want to make it to predictable it should be random. It also should change 2-3 times (for example from Rain to Snow to Wind). Is that possible? I tried with 3 "elapsed game time is..." -> "enviroment - create weather effect". But it didn't seem to work. Hope you can help me :)
 
Hey, I wanted to involve a "weather-change" in my new map. But because I don't want to make it to predictable it should be random. It also should change 2-3 times (for example from Rain to Snow to Wind). Is that possible? I tried with 3 "elapsed game time is..." -> "enviroment - create weather effect". But it didn't seem to work. Hope you can help me :)

There you go.
It changes weather every 8 seconds.
 

Attachments

wow thanks, is there also the possibility that there will be no weather effect (so the last created weather effect will be deleted)?
edit: I also would like to have random intervalls (between for example 1 and 30 seconds). How do I achieve that?
 
Last edited:
Mhm... It still changes every 8 seconds, as far as I see... Also there are 7 weather effects, and thre isn't the possibility that there will be no one. Maybe you uploaded the wrong one?
 
Mhm... It still changes every 8 seconds
I don't download his map yet, but I'm guessing he only randomize it once per game, whereas it should be randomize after each weather change or event occur.

This is how it should be;
  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set RandomTime = (Real((Random integer number between 5 and 10)))
      • Trigger - Add to Weather Change <gen> the event (Time - Every RandomTime seconds of game time)
  • Weather Change
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String(RandomTime))
      • Set RandomTime = (Real((Random integer number between 5 and 10)))
This is how it should be.

Instead of getting static value per game, the time is randomized for each time the Event occur.

Additional Notes
Trigger - Add New Event
RandomTime is in Real, but converted to Integer to randomize time for more accurate variation.


EDIT:
On second thought, I think it's just randomize the same thing, gonna experiment more.
 
good, that problem is sovled. The last open question is: how can I also grant the possibility, that the last created weather effect will be deleted (so there is NO weather).
 
Use a timer instead of a periodic event.
  • Countdown Timer - Start hai as a One-shot timer that will expire in (Random real number between 3.00 and 7.00) seconds
and for event
  • Time - hai expires
Run the timer each time it expires so it keeps repeating.

Hey ,isnt just simpler to use this event ?
  • Time - Every (Random real number between 3.00 and 7.00) seconds of game time
 
Hey ,isnt just simpler to use this event ?
  • Time - Every (Random real number between 3.00 and 7.00) seconds of game time

It doesn't do the same thing. The event is initialized while the map is loading which means the event will fire at equal intervals, different each game (depending on the random number).
 
Hey ,isnt just simpler to use this event ?
  • Time - Every (Random real number between 3.00 and 7.00) seconds of game time

no, that's the one mistake you made. The random real number will stay the same for the whole game. But my problem is solved, I just have to take youre map and combine it with the trigger above. Thanks!
 
Status
Not open for further replies.
Back
Top