- Joined
- Mar 21, 2014
- Messages
- 79
Hey, I have a problem with this code:
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?
-
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
-
Loop - 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)
-
Events
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?