• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Random Trigger?

Status
Not open for further replies.
I don't quite get the "-Turns Forest/Beach/City Trigger arena", so I'll post the base trigger:

  • Arena
    • Events
      • Time - Elapsed game time is 41.00 seconds
    • Conditions
    • Actions
      • Set RanInt = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RanInt Equal to 1
        • Then - Actions
          • // Forest
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RanInt Equal to 2
            • Then - Actions
              • // Beach
            • Else - Actions
              • // City
If you mean that the arena should be randomly chosen, then you can either:
- Set a variable to the arena region (if RanInt = 1, set ArenaRegion = Forest <gen>
- Enable/disable triggers (e.g. disable all arena triggers apart from the forest one).

If you meant something else, perhaps you could be more specific?

Another important thing:
Go to File -> Preferences -> Test Map
There, turn OFF "Use Fixed random seed" (if it is enabled, random values will not be random but always the same).
 
So uhm.
After 41 seconds, a random arena will be chosen... right?

Then you just pick the base trigger I've showed you a few posts ago and add the triggers of the other arena's.

  • Arena
    • Events
      • Time - Elapsed game time is 41.00 seconds
    • Conditions
    • Actions
      • Set RanInt = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RanInt Equal to 1
        • Then - Actions
          • Actions
            • Set ChooseOn = True
            • Set ForestArena = True
            • Trigger - Turn off City Arena <gen>
            • Trigger - Turn off Beach Arena <gen>
            • Trigger - Turn off Forest Arena <gen>
            • Trigger - Turn on Forest Tele 1 <gen>
            • Trigger - Turn on Forest Tele 2 <gen>
            • Set TeleForest = True
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RanInt Equal to 2
            • Then - Actions
              • Actions
                • Set BeachArena = True
                • Trigger - Turn off City Arena <gen>
                • Trigger - Turn off Beach Arena <gen>
                • Trigger - Turn off Forest Arena <gen>
                • Trigger - Turn on Beach Tele 1 <gen>
                • Trigger - Turn on Beach Tele 2 <gen>
                • Set TeleBeach = True
                • Set ChooseOn = True
            • Else - Actions
              • Actions
                • Set CityArena = True
                • Trigger - Turn off City Arena <gen>
                • Trigger - Turn off Beach Arena <gen>
                • Trigger - Turn off Forest Arena <gen>
                • Trigger - Turn on City Tele 1 <gen>
                • Trigger - Turn on City Tele 2 <gen>
                • Set ChooseOn = True
Note: I've noticed that your triggering isn't good.
Please learn how to remove memory leaks and code more efficiently (loops, if-then-else etc).

If you learn that, the chances that your map gets approved are higher.
 
Status
Not open for further replies.
Back
Top