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

Problem with Order(Spell ID)

Status
Not open for further replies.
Level 4
Joined
Mar 21, 2014
Messages
79
Hey, I have a problem with this code:

  • Stampede Check
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Current order of StampedeUnit) Equal to (Order(A00G))
    • Actions
      • Unit Group - Pick every unit in (Units in (Region centered at (Position of StampedeUnit) with size (1000.00, 1000.00)) matching (((Matching unit) belongs to an enemy of (Owner of StampedeUnit)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (Stampede Picked Unit + ((Name of (Picked unit)) + <Empty String>))
          • Game - Display to (All players) the text: (Stampede Hero: + (Name of StampedeUnit))
          • Unit - Cause StampedeUnit to damage (Picked unit), dealing (0.20 x (Real((Strength of StampedeUnit (Include bonuses))))) damage of attack type Spells and damage type Normal
I want to improve the Stampede Ability with Hero Attribute Bonus DMG.

The problem is to detect wheter Stampede is on or not. How can I correctly detect if the Hero is casting the spell or not? It should be possible to manually abort the spell and run away AND the trigger (above) stops working.

I thought taht if I have something like the condition (Current order of StampedeUnit) Equal to (Order(SPELL ID IN OBJECT EDITOR), then it would realize if this custom made spell is working or not. But it just simply does not find such an order and starts the event when my hero just stands around (order = stop).
The Game Display text is just for debugging, but the text doesn't show up when he's casting stampede. if I abort it, then it starts doing...

How can I fix this?
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Change the condition to "... Equal to (Order(stampede))".

The ability id does not matter for orders. Orders are either represented by a string or by an order id.


Mind that the current order switches to stampede the second when the unit is ordered to use stampede, so not when the ability actually starts.
 
Level 4
Joined
Mar 21, 2014
Messages
79
thanks!

But I already found another way to do it... I made 2 more triggers, one has a event " A unit starts casting an ability " and the other " A unit stops casting an ability" and "A units finishes casting an ability". Then I just disable or enable this trigger when this happens. works fine =)
 
Status
Not open for further replies.
Top