• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

Help Needed with Random Events

Status
Not open for further replies.
Level 7
Joined
Feb 13, 2022
Messages
86
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 21
Joined
Mar 29, 2020
Messages
1,237
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: 8
Level 7
Joined
Feb 13, 2022
Messages
86
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