• 🏆 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!

Random number

Status
Not open for further replies.
Level 4
Joined
Jun 22, 2009
Messages
63
im making a game when you fight 1vs1 in turns. I want to make the computer choose between one of the 3 attacks every turn. Like if random number between 1 and 3 equal to 1,turn .... trigger on
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 083
    • Events
    • Conditions
    • Actions
      • Set Temp_Integer_1 = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Integer_1 Equal to 1
        • Then - Actions
          • Unit - Order Temp_Unit_1 to Human Priest - Inner Fire Temp_Unit_2
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer_1 Equal to 2
            • Then - Actions
              • Unit - Order Temp_Unit_1 to Human Priest - Dispel Temp_Unit_2
            • Else - Actions
              • Unit - Order Temp_Unit_1 to Human Priest - Heal Temp_Unit_2
 
Status
Not open for further replies.
Top