Rainbird
07-26-2006, 4:44 PM
Okay, my "possible" question is as follows: Is it possible to stop an already running trigger? Because if it is, then it's my triggers that aren't working properly.
The deal is that I have a unit with a transformation-skill. Now that works just fine, no trouble with transforming etc... But the transformed unit also has a transformation skill, so when the skill the first unit used runs out, it spawns an extra hero...
I need it done so that the timer from the first skill cancels when the next skill is used, or something alike
Need heeeeelp...
The skills/triggers:
morph level1
Events
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Conditions
And - All (Conditions) are true
Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
(Ability being cast) Equal to Transform (Level 1)
Actions
Set HeroCache3 = (Triggering unit)
Game Cache - Create a game cache from map.w3x
Game Cache - Store HeroCache3 as morph of Category in (Last created game cache)
Special Effect - Create a special effect attached to the chest of HeroCache3 using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
Wait 0.50 seconds
Unit - Replace HeroCache3 with a Transformed (Level 1) using The new unit's max life and mana
Set HeroMorph3 = (Last replaced unit)
Hero - Set HeroMorph3 Hero-level to (Level of HeroCache3), Hide level-up graphics
Animation - Change HeroMorph3's size to (90.00%, 90.00%, 90.00%) of its original size
Special Effect - Destroy (Last created special effect)
Selection - Select HeroMorph3 for Player 1 (Red)
Wait 60.00 seconds
Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Undead\Darksummoning\DarkSummonTa rget.mdl
Wait 0.50 seconds
Game Cache - Restore morph of Category from (Last created game cache) for Player 1 (Red) at (Position of HeroMorph3) facing 0.00
Set HeroCache3 = (Last restored unit)
Selection - Select HeroCache3 for Player 1 (Red)
Hero - Set HeroCache3 Hero-level to (Level of HeroMorph3), Hide level-up graphics
Unit - Remove HeroMorph3 from the game
morph level2
Events
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Conditions
And - All (Conditions) are true
Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
(Ability being cast) Equal to Transform (Level 2)
Actions
Set HeroCache4 = (Triggering unit)
Game Cache - Create a game cache from map.w3x
Game Cache - Store HeroCache4 as morphed2 of Category in (Last created game cache)
Special Effect - Create a special effect attached to the chest of HeroCache4 using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
Wait 0.50 seconds
Unit - Replace HeroCache4 with a Transformed (Level 2) using The new unit's max life and mana
Set HeroMorph4 = (Last replaced unit)
Hero - Set HeroMorph4 Hero-level to (Level of HeroCache4), Hide level-up graphics
Animation - Change HeroMorph4's size to (110.00%, 110.00%, 110.00%) of its original size
Special Effect - Destroy (Last created special effect)
Selection - Select HeroMorph4 for Player 1 (Red)
Wait 60.00 seconds
Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Undead\Darksummoning\DarkSummonTa rget.mdl
Wait 0.50 seconds
Game Cache - Restore morph of Category from (Last created game cache) for Player 1 (Red) at (Position of HeroMorph4) facing 0.00
Set HeroCache4 = (Last restored unit)
Selection - Select HeroCache4 for Player 1 (Red)
Hero - Set HeroCache4 Hero-level to (Level of HeroMorph4), Hide level-up graphics
Unit - Remove HeroMorph4 from the game
As you can see I try to restore the original unit, instead of the morph2 unit. I don't know if that can be changed to something better. (I just store morph2, just in case...)
Please help...:(
The deal is that I have a unit with a transformation-skill. Now that works just fine, no trouble with transforming etc... But the transformed unit also has a transformation skill, so when the skill the first unit used runs out, it spawns an extra hero...
I need it done so that the timer from the first skill cancels when the next skill is used, or something alike
Need heeeeelp...
The skills/triggers:
morph level1
Events
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Conditions
And - All (Conditions) are true
Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
(Ability being cast) Equal to Transform (Level 1)
Actions
Set HeroCache3 = (Triggering unit)
Game Cache - Create a game cache from map.w3x
Game Cache - Store HeroCache3 as morph of Category in (Last created game cache)
Special Effect - Create a special effect attached to the chest of HeroCache3 using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
Wait 0.50 seconds
Unit - Replace HeroCache3 with a Transformed (Level 1) using The new unit's max life and mana
Set HeroMorph3 = (Last replaced unit)
Hero - Set HeroMorph3 Hero-level to (Level of HeroCache3), Hide level-up graphics
Animation - Change HeroMorph3's size to (90.00%, 90.00%, 90.00%) of its original size
Special Effect - Destroy (Last created special effect)
Selection - Select HeroMorph3 for Player 1 (Red)
Wait 60.00 seconds
Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Undead\Darksummoning\DarkSummonTa rget.mdl
Wait 0.50 seconds
Game Cache - Restore morph of Category from (Last created game cache) for Player 1 (Red) at (Position of HeroMorph3) facing 0.00
Set HeroCache3 = (Last restored unit)
Selection - Select HeroCache3 for Player 1 (Red)
Hero - Set HeroCache3 Hero-level to (Level of HeroMorph3), Hide level-up graphics
Unit - Remove HeroMorph3 from the game
morph level2
Events
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Conditions
And - All (Conditions) are true
Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
(Ability being cast) Equal to Transform (Level 2)
Actions
Set HeroCache4 = (Triggering unit)
Game Cache - Create a game cache from map.w3x
Game Cache - Store HeroCache4 as morphed2 of Category in (Last created game cache)
Special Effect - Create a special effect attached to the chest of HeroCache4 using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
Wait 0.50 seconds
Unit - Replace HeroCache4 with a Transformed (Level 2) using The new unit's max life and mana
Set HeroMorph4 = (Last replaced unit)
Hero - Set HeroMorph4 Hero-level to (Level of HeroCache4), Hide level-up graphics
Animation - Change HeroMorph4's size to (110.00%, 110.00%, 110.00%) of its original size
Special Effect - Destroy (Last created special effect)
Selection - Select HeroMorph4 for Player 1 (Red)
Wait 60.00 seconds
Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Undead\Darksummoning\DarkSummonTa rget.mdl
Wait 0.50 seconds
Game Cache - Restore morph of Category from (Last created game cache) for Player 1 (Red) at (Position of HeroMorph4) facing 0.00
Set HeroCache4 = (Last restored unit)
Selection - Select HeroCache4 for Player 1 (Red)
Hero - Set HeroCache4 Hero-level to (Level of HeroMorph4), Hide level-up graphics
Unit - Remove HeroMorph4 from the game
As you can see I try to restore the original unit, instead of the morph2 unit. I don't know if that can be changed to something better. (I just store morph2, just in case...)
Please help...:(