If I have a unit casting an ability from within a spellbook that is an item, what is the event I use to see if this happened?
Unit Uses an Item doesn't seem to work, neither does Starts the Effect of an Ability.
EDIT: Apparently Starts the Effect of an Ability DOES work, it was my condition that was getting in the way. Even though it is "Ability Being Cast = MyAbility, it won't continue the trigger.
In this case how do I get the condition Ability being cast to work with a spell that is being cast from within an item spell book?
EDIT: Okay something definitely weird is going on. Right now the trigger gets as far as just before the condition where it sends 'Text' to tell me it got that far, but if I change it to an exact copy of the ability I m trying to check for and cast that instead, it works but wont return that the ability cast for some reason with the text string. Its like it is only firing half of the trigger.
I got the spell to cast reliably by using a different spell then channel as the dummy, but for some reason it won't remove the building from the game.
Unit Uses an Item doesn't seem to work, neither does Starts the Effect of an Ability.
EDIT: Apparently Starts the Effect of an Ability DOES work, it was my condition that was getting in the way. Even though it is "Ability Being Cast = MyAbility, it won't continue the trigger.
In this case how do I get the condition Ability being cast to work with a spell that is being cast from within an item spell book?
EDIT: Okay something definitely weird is going on. Right now the trigger gets as far as just before the condition where it sends 'Text' to tell me it got that far, but if I change it to an exact copy of the ability I m trying to check for and cast that instead, it works but wont return that the ability cast for some reason with the text string. Its like it is only firing half of the trigger.
-
BuildingDummyTest
-
Events
- Unit - A unit Finishes casting an ability
- Conditions
-
Actions
- Game - Display to (All players) the text: AbilityCast!
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Place Fortifications
-
Then - Actions
- Game - Display to (All players) the text: AbilityCast!
- Set TempHeroPoint = (Position of (Triggering unit))
- Set FortificationDummy = (Target unit of ability being cast)
- Set FortificationDummyPoint = (Position of FortificationDummy)
- Item - Set charges remaining in (Item carried by (Triggering unit) of type Wood Boards) to ((Charges remaining in (Item carried by (Triggering unit) of type Wood Boards)) - 1)
- Unit - Create 1 FortifyingDummy for (Owner of (Triggering unit)) at TempHeroPoint facing Default building facing degrees
- Unit - Remove (Target unit of ability being cast) from the game
- Unit - Order (Last created unit) to build a Window at FortificationDummyPoint
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Else - Actions
-
If - Conditions
-
Events
I got the spell to cast reliably by using a different spell then channel as the dummy, but for some reason it won't remove the building from the game.
Last edited: