• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Help Needed with Random Events

Status
Not open for further replies.
Level 7
Joined
Feb 13, 2022
Messages
87
Hello I am currently working on my warcraft map and I need help! So Im trying to make random events occur every 5 minutes (1-6 different events), they start happening after 160 seconds have passed in game. I know what I want each event to do, 1-2 clear weather nothing happens, and 3 is Rainy weather giving specific enemies of a type a temporarily speed boost. Number 4 would be a invulnerability and speed boost to all the players. Number 5 would be a blood moon, giving another type of enemies a temporarily speed boost. Number 6 would be randomly placed stun traps across the map. I don't need help with the specifics of each event, I need help with making the event occur periodically and randomly. I also need help with setting up each event. Thank you in an advance.
 
Level 25
Joined
Mar 29, 2020
Messages
1,465
this is how I would go about it:

  • EventsInit
    • Events
      • Time - Elapsed game time is 160.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn on EventsLoop <gen>
this trigger is initially off (right click the trigger to set that)
  • EventsLoop
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Trigger - Run Emit random event <gen> (checking conditions)
  • Emit random event
    • Events
    • Conditions
    • Actions
      • Set VariableSet EventRandomizer = (Random integer number between 1 and 6)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EventRandomizer Equal to 1
        • Then - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EventRandomizer Equal to 2
            • Then - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EventRandomizer Equal to 3
                • Then - Actions
                  • Trigger - Run RE3 Rainy <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EventRandomizer Equal to 4
                    • Then - Actions
                      • Trigger - Run RE4 Speed Invul <gen> (checking conditions)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • EventRandomizer Equal to 5
                        • Then - Actions
                          • Trigger - Run RE5 Blood Moon <gen> (checking conditions)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • EventRandomizer Equal to 6
                            • Then - Actions
                              • Trigger - Run RE6 Spam StasisWards <gen> (checking conditions)
                            • Else - Actions
and in this last trigger you send to all the different triggers where you define the specific events. you could have them all jammed in here, but that makes it a pain to read and to edit. this way things are much more straightforward and organized (although possible a teeny bit less efficient, but if you want efficiency GUI isn't your friend anyways... )
 

Attachments

  • Random SneakyTurtle Events.w3m
    17.7 KB · Views: 12
Level 7
Joined
Feb 13, 2022
Messages
87
this is how I would go about it:

  • EventsInit
    • Events
      • Time - Elapsed game time is 160.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn on EventsLoop <gen>
this trigger is initially off (right click the trigger to set that)
  • EventsLoop
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Trigger - Run Emit random event <gen> (checking conditions)
  • Emit random event
    • Events
    • Conditions
    • Actions
      • Set VariableSet EventRandomizer = (Random integer number between 1 and 6)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EventRandomizer Equal to 1
        • Then - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EventRandomizer Equal to 2
            • Then - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EventRandomizer Equal to 3
                • Then - Actions
                  • Trigger - Run RE3 Rainy <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EventRandomizer Equal to 4
                    • Then - Actions
                      • Trigger - Run RE4 Speed Invul <gen> (checking conditions)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • EventRandomizer Equal to 5
                        • Then - Actions
                          • Trigger - Run RE5 Blood Moon <gen> (checking conditions)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • EventRandomizer Equal to 6
                            • Then - Actions
                              • Trigger - Run RE6 Spam StasisWards <gen> (checking conditions)
                            • Else - Actions
and in this last trigger you send to all the different triggers where you define the specific events. you could have them all jammed in here, but that makes it a pain to read and to edit. this way things are much more straightforward and organized (although possible a teeny bit less efficient, but if you want efficiency GUI isn't your friend anyways... )
Sweet thank you a ton! It worked like a charm!!
 
Status
Not open for further replies.
Top