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

Random Integer doesnt work

Status
Not open for further replies.
Level 7
Joined
Apr 13, 2012
Messages
110
  • unitisattackedsounds
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to THEUNIT
    • Actions
      • Set randomsoundattck = (Random integer number between 1 and 100)
      • For each (Integer randomsoundattck) from 1 to 10, do (Actions)
        • Loop - Actions
          • Sound - Play MuradinPissed7 <gen>
      • For each (Integer randomsoundattck) from 11 to 20, do (Actions)
        • Loop - Actions
          • Sound - Play MuradinPissed6 <gen>
      • For each (Integer randomsoundattck) from 21 to 30, do (Actions)
        • Loop - Actions
          • Sound - Play MuradinYesAttack3 <gen>
Thats just weird,It keeps playing the MuradinPissed7 wherever I put it 1 to 10,11 to 20,21 to 30,...1 to 2 it just keeps playing that !@#$%in MuradinPissed7

Is something wrong cause she seems to me just fine
 
Level 7
Joined
Apr 13, 2012
Messages
110
Ok guys that just weird

  • unitisattackedsounds
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to THEUNIT
    • Actions
      • Set randomsoundattck = (Random integer number between 1 and 30)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • randomsoundattck Less than or equal to 10
        • Then - Actions
          • Sound - Play MuradinYesAttack3 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • randomsoundattck Less than or equal to 20
          • randomsoundattck Greater than 10
        • Then - Actions
          • Sound - Play MuradinPissed6 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • randomsoundattck Less than or equal to 30
          • randomsoundattck Greater than 20
        • Then - Actions
          • Sound - Play MuradinPissed7 <gen>
        • Else - Actions
I did us you both said and (thats amazing) it was still playing only muradinpissed7 then i replaced that haunted sound and didnt play any other sound wtf???
 
If you're using the -test- map button, randomised things in triggers, aren't so random, they're actually almost always consistently the same thing regardless of how random you make them, this also includes things like, random points being consistent, even if they're map wide, test the map by going into the game manually and playing it, should get more random results.
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
If you're using the -test- map button, randomised things in triggers, aren't so random, they're actually almost always consistently the same thing regardless of how random you make them, this also includes things like, random points being consistent, even if they're map wide, test the map by going into the game manually and playing it, should get more random results.
That depends whether Use Fixed Random Seed is enabled in preferences.
 
Status
Not open for further replies.
Top