• 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] Will this leak..?

Status
Not open for further replies.
The point of this trigger is for when a unit gets attacked he is to cast a war stomp ability but he can only do it every 5 seconds.. but will this leak? (i know its not MUI and im working on fixing that)

  • Boss is attacked
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set CO_AttackingUnit[(Player number of (Owner of (Attacking unit)))] = (Attacking unit)
      • Set CO_AttackedUnit[(Player number of (Owner of (Attacked unit)))] = (Attacked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of CO_AttackingUnit[(Player number of (Owner of (Attacking unit)))]) is an enemy of (Owner of CO_AttackedUnit[(Player number of (Owner of (Attacked unit)))])) Equal to True
          • (Unit-type of CO_AttackedUnit[(Player number of (Owner of (Attacked unit)))]) Equal to Firelord
        • Then - Actions
          • Unit - Add Counter Attack to CO_AttackedUnit[(Player number of (Owner of (Attacked unit)))]
          • Unit - Order CO_AttackedUnit[(Player number of (Owner of (Attacked unit)))] to Orc Tauren Chieftain - War Stomp
          • Wait 1.00 seconds
          • Unit - Remove Counter Attack from CO_AttackedUnit[(Player number of (Owner of (Attacked unit)))]
        • Else - Actions
  • Boss is attacked cooldown
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Counter Attack
    • Actions
      • Wait 1.00 seconds
      • Trigger - Turn off Boss is attacked <gen>
      • Wait 5.00 seconds
      • Trigger - Turn on Boss is attacked <gen>
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Nopes, i dont think so,,
But why first set the variables, and THEN check if they are enemys?
Why not just:
  • conditions
    • ((Owner of (Attacking Unit)) is an enemy of(Ownder of (Attacked unit))) equal to true
    • Unit-type of (Attacked Unit) equal to Firelord
And then set the variables, otherwise the variable could be set to another unit while waitin 1 sec,,
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Well,, random number isnt really random number, for as far as i know,,
But:
  • Set RANDOM = random integer number between 1 and 100
    • if Random greater then or equal to 75
    • then do 75/100 actions
    • else
      • if RANDOM less then 75
        • RANDOM greater then or equal to 50
      • then do 50/75 actions
      • else
        • if RANDOM less then 50
          • And RANDOM Greater then or equal to 25
        • then do 25/50 actions
        • else do 0/25 actions
Hope it works for you
 
Status
Not open for further replies.
Top