• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Random Weather Effects

Status
Not open for further replies.
Level 34
Joined
Sep 6, 2006
Messages
8,873
I tried to make a random weather trigger a while ago. I want to try and get it working for my new map. Before I had it something like:

Event - Every 200 seconds of the game.
Action -
-Condition - Random Integer between 1 and 10 equal to or less than 3
Then do Action
Create weather effect at (all of playable map) Light rain
Wait 20 seconds
Remove last weather effect
Create Weather effect at (all of playable map) Heavy rain

I had other stuff but that was the base of it. I couldn't find a tutorial, if someone could make one quickley for me, or point me to a tut that would be wicked, thanks.
 
Level 4
Joined
Jul 12, 2007
Messages
116
  • Example
    • Events
      • Time - Every 200.00 seconds of game time
    • Conditions
    • Actions
      • Set Random_Integer = (Random integer number between 1 and 4)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Random_Integer Equal to 1
        • Then - Actions
          • Environment - Remove (Last created weather effect)
          • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Random_Integer Equal to 2
        • Then - Actions
          • Environment - Remove (Last created weather effect)
          • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Random_Integer Equal to 3
        • Then - Actions
          • Environment - Remove (Last created weather effect)
          • Environment - Create at (Playable map area) the weather effect Northrend Snow (Light)
        • Else - Actions
          • Do nothing

Random_Integer is an integer variable, if Random_Integer becomes 4 the weather is not changing.

I hope i have helped.
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
Thanks, it should work. +rep if it does (Can't test it right now)
Although I think this is exactly what I had before. Can't remembr, maybe something was missing.
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
  • Random Weather
    • Events
      • Player - Player 1 (Red) types a chat message containing -rain as An exact match
    • Conditions
    • Actions
      • Set Random_Weather = (Random integer number between 1 and 2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Random_Weather Equal to 1
        • Then - Actions
          • Environment - Remove (Last created weather effect)
          • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)
          • Wait 3.00 seconds
          • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Heavy)
          • Wait 3.00 seconds
          • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)
          • Wait 3.00 seconds
          • Environment - Create at (Playable map area) the weather effect Rays Of Light
        • Else - Actions
          • Do nothing
It won't work what's wrong?
 
Level 5
Joined
Jan 15, 2007
Messages
199
  • Untitled Trigger 002
    • Events
      • Player - Player 1 (Red) types a chat message containing -rain as An exact match
    • Conditions
    • Actions
      • Set Random_Weather = (Random integer number between 1 and 2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Random_Weather Equal to 1
        • Then - Actions
          • Environment - Remove (Last created weather effect)
          • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)
          • Environment - Turn (Last created weather effect) On
          • Wait 3.00 seconds
          • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Heavy)
          • Environment - Turn (Last created weather effect) On
          • Wait 3.00 seconds
          • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)
          • Environment - Turn (Last created weather effect) On
          • Wait 3.00 seconds
          • Environment - Create at (Playable map area) the weather effect Rays Of Light
          • Environment - Turn (Last created weather effect) On
        • Else - Actions
This works, i think you just had to enable them... Also, never, never use do nothing, it just does nothing but take up game speed and map size
 
Status
Not open for further replies.
Top