• 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.

Generating Weather!

Status
Not open for further replies.
Level 4
Joined
Jun 2, 2012
Messages
747
Hello hivers! I am here to ask how to generate weathers. Like every 5 minutes it will rain in entire map and after 5 minutes again it will be windy and the same process.... How do I do that. Pls state in trigger cuz I undertand more than simple words. I have an idea on my mind on doing this but not yet sure so Im waiting for someone to answer.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Here is one way to do it.

  • Change Environment
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • -------- Removes any weather effect, allowing a new one to take its place --------
      • Environment - Remove (Last created weather effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 5) Equal to 1
        • Then - Actions
          • -------- 20% chance for this --------
          • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
          • Environment - Turn (Last created weather effect) On
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 4) Equal to 1
            • Then - Actions
              • -------- If the first effect didnt play, then 25% for this. --------
              • Environment - Create at (Playable map area) the weather effect Rays Of Light
              • Environment - Turn (Last created weather effect) On
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 3) Equal to 1
                • Then - Actions
                  • -------- 33.3% --------
                  • Environment - Create at (Playable map area) the weather effect Northrend Blizzard
                  • Environment - Turn (Last created weather effect) On
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 2) Equal to 1
                    • Then - Actions
                      • -------- 50% --------
                      • Environment - Create at (Playable map area) the weather effect Wind (Heavy)
                      • Environment - Turn (Last created weather effect) On
                    • Else - Actions
                      • -------- 100% --------
                      • -------- Do Nothing Means this time no weather will be displayed --------
                      • Do nothing
Of course, you can make more lines of code to add or remove any weather effects you do/do not want. You can remove the "do nothing" at the end if you always want weather effects displaying.

And because I was bored tonight...a map upload
 

Attachments

  • Weather.w3x
    20.4 KB · Views: 34
Level 4
Joined
Jun 2, 2012
Messages
747
Here is one way to do it.

  • Change Environment
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • -------- Removes any weather effect, allowing a new one to take its place --------
      • Environment - Remove (Last created weather effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 5) Equal to 1
        • Then - Actions
          • -------- 20% chance for this --------
          • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
          • Environment - Turn (Last created weather effect) On
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 4) Equal to 1
            • Then - Actions
              • -------- If the first effect didnt play, then 25% for this. --------
              • Environment - Create at (Playable map area) the weather effect Rays Of Light
              • Environment - Turn (Last created weather effect) On
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 3) Equal to 1
                • Then - Actions
                  • -------- 33.3% --------
                  • Environment - Create at (Playable map area) the weather effect Northrend Blizzard
                  • Environment - Turn (Last created weather effect) On
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 2) Equal to 1
                    • Then - Actions
                      • -------- 50% --------
                      • Environment - Create at (Playable map area) the weather effect Wind (Heavy)
                      • Environment - Turn (Last created weather effect) On
                    • Else - Actions
                      • -------- 100% --------
                      • -------- Do Nothing Means this time no weather will be displayed --------
                      • Do nothing
Of course, you can make more lines of code to add or remove any weather effects you do/do not want. You can remove the "do nothing" at the end if you always want weather effects displaying.

And because I was bored tonight...a map upload

Thanks but I have found an easier way just now for this trigger. Its like it will set random numbers to 1 to 3 and if 1 then set rain if 2 then set heavy wind.... like that! But if this trigger I have found somewhere doesnt work Ill try yours!
 
Status
Not open for further replies.
Top