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

[Trigger] Help me with a AutoSpell....

Status
Not open for further replies.
Level 5
Joined
Mar 24, 2008
Messages
98
This was supposed to be my trigger
  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Unit-type of (Attacking unit)) Equal to SkillMaker
  • Actions
    • Set Clap_Integer = (Random integer number between 1 and 15)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Clap_Integer Greater than or equal to 15
      • Then - Actions
        • Unit Group - Pick every unit in (Units within 250.00 of (Position of (Attacking unit)) matching (((Unit-type of (Triggering unit)) Equal to Stunning Dummy) and (((Unit-type of (Attacking unit)) Equal to SkillMaker) and (((Triggering unit) belongs to an enemy of (Owner of (Attacking unit))) and do (Actions)
          • Loop - Actions
            • Selection - Remove (Attacking unit) from selection for (Owner of (Attacking unit))
            • Unit - Create 1 Stunning Dummy for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing (270.0) degrees
            • Unit - Add Thunder Clapping to (Picked unit)
            • Unit - Set level of Thunder Clapping for (Picked unit) to (Level of Thundering Hammer for (Attacking unit))
            • Unit - Order (Picked unit) to Human Mountain King - Thunder Clap (Position of (Picked unit))
            • Wait 0.30 seconds
            • Unit - Remove Thunder Clapping from (Picked unit)
            • Wait 0.15 seconds
            • Unit - Remove (Picked unit) from the game
            • Selection - Add (Attacking unit) to selection for (Owner of (Attacking unit))
      • Else - Actions
        • Do nothing
I want the dummy to use a thunder clap within a 15% chance..
But still it doesnt work... Please tell me how to make the dummy use the spell... :confused:
 
Level 6
Joined
Dec 28, 2007
Messages
178
mi a bit tired but i can tell you if you want 15% chance the random integer should be between 1 and 100 and it should be less or equal to 15(your chance is about...6.666666%)
 
Level 6
Joined
Dec 28, 2007
Messages
178
created unit cannot be named as picked unit inside the loop
when created save him in a variable and use it to perform actions
 
Status
Not open for further replies.
Top