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

[Trigger] RANDOM variable in a RANDOM variable

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
[Solved] RANDOM variable in a RANDOM variable

I made a If/Then/Else trigger with a RANDOM variable (random number between 1 and 100) and another If/Then/Else trigger in it (with another RANDOM less then X), will the first RANDOM number be saved, or should I make 2 RANDOM variables? To give a bit of an idea of what I mean:

  • Actions
    • Set RANDOM = (Random integer number between 1 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RANDOM Less than or equal to 25
      • Then - Actions
        • Set RANDOM = (Random integer number between 1 and 100)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RANDOM Less than or equal to 25
          • Then - Actions
          • Else - Actions
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RANDOM Greater than 25
      • Then - Actions
      • Else - Actions
Is the RANDOM with the first 'RANDOM' saved for the second 'RANDOM' (outside the first RANDOM If/Then/Else command), or is that into lost with the 'RANDOM' in the first RANDOM If/Then/Else trigger?
 
Status
Not open for further replies.
Top