- Joined
- Jan 14, 2016
- Messages
- 43
Issue is tentatively fixed - problem is 'Channel' ability implementing mana cost after effect started.
So, I've got a few spells based on Channel (ID'd to charm, earthquake, and summonphoenix), and triggers to implement the effects if they're cast where I want 'em, and refund mana if they're cast elsewhere. Event for all of them is 'Starts the effect of an ability'
BUT, all the triggers are refunding the mana BEFORE the spell has implemented the mana cost. Clearly I'm an idiot and I'm missing something obvious, but I've made dozens of similar dummy spell type abilities in the past without running into this issue, and I just cannot see where I'm going wrong.
Here's the shortest of the affected triggers. I know there appear to be some superfluous variables. The refund mana bit is at the very end - skip over the rest.
Does anyone know what I'm missing here? Thanks in advance!
So, I've got a few spells based on Channel (ID'd to charm, earthquake, and summonphoenix), and triggers to implement the effects if they're cast where I want 'em, and refund mana if they're cast elsewhere. Event for all of them is 'Starts the effect of an ability'
BUT, all the triggers are refunding the mana BEFORE the spell has implemented the mana cost. Clearly I'm an idiot and I'm missing something obvious, but I've made dozens of similar dummy spell type abilities in the past without running into this issue, and I just cannot see where I'm going wrong.
Here's the shortest of the affected triggers. I know there appear to be some superfluous variables. The refund mana bit is at the very end - skip over the rest.
-
Cast Dominate
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Dominate (chess)
-
Actions
- Set ManaAllocated = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to CurrentPlayer
- ((Target unit of ability being cast) is in antigroup) Equal to True
-
Then - Actions
- Set tempypoint = (Position of (Target unit of ability being cast))
- -------- =========== --------
- Unit - Create 1 dummy for Player 3 (Teal) at tempypoint facing Default building facing degrees
- Unit - Add buffer Dominate to (Last created unit)
- Unit - Order (Last created unit) to Orc Shaman - Lightning Shield (Target unit of ability being cast)
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- -------- =========== --------
- Unit Group - Remove (Target unit of ability being cast) from antigroup
- Unit Group - Add (Target unit of ability being cast) to currentgroup
- Unit - Change ownership of (Target unit of ability being cast) to CurrentAllyPlayer and Retain color
- Special Effect - Create a special effect at tempypoint using Abilities\Spells\Other\Charm\CharmTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation (udg_tempypoint)
- If (MovePhase Equal to True) then do (Unit - Add Move (chess) to (Target unit of ability being cast)) else do (Unit - Add Target (chess alternative) to (Target unit of ability being cast))
- Unit Group - Add (Target unit of ability being cast) to AbGruDominate
-
Else - Actions
- Quest - Display to (Player group((Owner of (Triggering unit)))) the Warning message: |c00FF0000You can o...
- Set CasterDominate = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ManaAllocated Equal to False
-
Then - Actions
- Unit - Set mana of CasterDominate to ((Mana of CasterDominate) + 70.00)
- Set ManaAllocated = True
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Events
Does anyone know what I'm missing here? Thanks in advance!
Last edited: