• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Random not working

Status
Not open for further replies.
Level 13
Joined
Sep 14, 2008
Messages
1,407
I run this trigger from another trigger but it won't work... it always selects the same heros...

  • Select Survivors
    • Event
    • Conditions
    • Actions
      • Set randomInt = (Random integer number between 0 and 5)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Condition
          • HeroSelected[randomInt] equal False
        • 'THEN'-Actions
          • Unitgroup - Add Heros[randomInt] to survivors
            • Set HeroSelected[randomInt] = True
            • Set counter = (counter + 1)
        • 'ELSE'-Actions
          • Trigger- Run (This trigger) (ignoring conditions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Condition
          • counter Gleich numPlayerPlaying
        • 'THEN'-Actions
          • Trigger- Run Survivors <gen> (ignoring conditions)
        • 'ELSE'-Actions
          • Trigger - Run (This trigger) (ignoring conditions)
This is the heros Array..

  • Init variables
    • Event
      • Map initialization
    • Conditions
    • Actions
      • Set Heros[1] = Ambassador of the Moon Guild 0006 <gen>
      • Set Heros[2] = Ambassador of the Blood Guild 0008 <gen>
      • Set Heros[3] = Ambassador of the Shadow Guild 0009 <gen>
      • Set Heros[4] = Ambassador of the Arcane Guild 0007 <gen>

EDIT:

I added the map so you can try it for yourself...

PLEASE help me
 

Attachments

Last edited:
It seems odd to me that this wouldn't work. Have you tried restarting your computer/trying it on a different one? I'm not 100% sure how random numbers are generated, but I do know they involve the system somehow.
 
Status
Not open for further replies.
Back
Top