- Joined
- Aug 12, 2008
- Messages
- 350
Spell descriptionPlace a water orb when cast. As long as the orb is still alive, Water Elemental is able to morph to the position of the orb once. If Water Elemental did not morph to the position of the orb while the orb is still alive, Water Elemental will automatically morph to the position of the orb when the orb die. Orb lasts for 7 seconds.
Water Way ability will be added when cast
Cast time: 0.5 seconds
[trigger=WO cast]WO cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Water Orb
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WO_index1 Equal to 0
Then - Actions
Trigger - Turn on WO count <gen>
Trigger - Turn on WO water way <gen>
Else - Actions
Set WO_index1 = (WO_index1 + 1)
Set WO_index2 = (WO_index2 + 1)
Set WO_check[WO_index2] = False
Set WO_caster[WO_index2] = (Triggering unit)
Set WO_casterpoint = (Position of WO_caster[WO_index2])
Set WO_count[WO_index2] = 0.00
Unit - Add Water Way to WO_caster[WO_index2]
Unit Group - Add WO_caster[WO_index2] to WO_heroesgroup
Unit - Create 1 Orb of Water for (Owner of WO_caster[WO_index2]) at WO_casterpoint facing Default building facing degrees
Set WO_dummy[WO_index2] = (Last created unit)
Special Effect - Create a special effect at WO_casterpoint using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Special Effect - Destroy (Last created special effect)
[/trigger]
[trigger=WO count]WO count
Events
Time - Every 0.25 seconds of game time
Conditions
Actions
For each (Integer WO_index3) from 1 to WO_index2, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
WO_count[WO_index3] Less than 7.00
(WO_caster[WO_index3] is in WO_heroesgroup) Equal to True
Then - Actions
Set WO_count[WO_index3] = (WO_count[WO_index3] + 0.25)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(WO_caster[WO_index3] is in WO_heroesgroup) Equal to True
Then - Actions
Unit Group - Remove WO_caster[WO_index3] from WO_heroesgroup
Else - Actions
Set WO_dummypoint = (Position of WO_dummy[WO_index3])
Unit - Move WO_caster[WO_index3] instantly to WO_dummypoint
Special Effect - Create a special effect at WO_dummypoint using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Special Effect - Destroy (Last created special effect)
Unit - Kill WO_dummy[WO_index3]
Unit - Remove Water Way from WO_caster[WO_index3]
Custom script: set udg_WO_caster[udg_WO_index3] = null
Custom script: call RemoveLocation (udg_WO_dummypoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WO_check[WO_index3] Equal to False
Then - Actions
Set WO_index1 = (WO_index1 - 1)
Set WO_check[WO_index3] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WO_index1 Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Set WO_index2 = 0
Else - Actions
[/trigger]
[trigger=WO water way]WO water way
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Water Way
Actions
Unit Group - Remove (Triggering unit) from WO_heroesgroup
[/trigger]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Water Orb
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WO_index1 Equal to 0
Then - Actions
Trigger - Turn on WO count <gen>
Trigger - Turn on WO water way <gen>
Else - Actions
Set WO_index1 = (WO_index1 + 1)
Set WO_index2 = (WO_index2 + 1)
Set WO_check[WO_index2] = False
Set WO_caster[WO_index2] = (Triggering unit)
Set WO_casterpoint = (Position of WO_caster[WO_index2])
Set WO_count[WO_index2] = 0.00
Unit - Add Water Way to WO_caster[WO_index2]
Unit Group - Add WO_caster[WO_index2] to WO_heroesgroup
Unit - Create 1 Orb of Water for (Owner of WO_caster[WO_index2]) at WO_casterpoint facing Default building facing degrees
Set WO_dummy[WO_index2] = (Last created unit)
Special Effect - Create a special effect at WO_casterpoint using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Special Effect - Destroy (Last created special effect)
[/trigger]
[trigger=WO count]WO count
Events
Time - Every 0.25 seconds of game time
Conditions
Actions
For each (Integer WO_index3) from 1 to WO_index2, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
WO_count[WO_index3] Less than 7.00
(WO_caster[WO_index3] is in WO_heroesgroup) Equal to True
Then - Actions
Set WO_count[WO_index3] = (WO_count[WO_index3] + 0.25)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(WO_caster[WO_index3] is in WO_heroesgroup) Equal to True
Then - Actions
Unit Group - Remove WO_caster[WO_index3] from WO_heroesgroup
Else - Actions
Set WO_dummypoint = (Position of WO_dummy[WO_index3])
Unit - Move WO_caster[WO_index3] instantly to WO_dummypoint
Special Effect - Create a special effect at WO_dummypoint using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Special Effect - Destroy (Last created special effect)
Unit - Kill WO_dummy[WO_index3]
Unit - Remove Water Way from WO_caster[WO_index3]
Custom script: set udg_WO_caster[udg_WO_index3] = null
Custom script: call RemoveLocation (udg_WO_dummypoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WO_check[WO_index3] Equal to False
Then - Actions
Set WO_index1 = (WO_index1 - 1)
Set WO_check[WO_index3] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WO_index1 Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Set WO_index2 = 0
Else - Actions
[/trigger]
[trigger=WO water way]WO water way
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Water Way
Actions
Unit Group - Remove (Triggering unit) from WO_heroesgroup
[/trigger]
Triggers looks fine, isn't it? I made the spell based on the Fiery Form spell created by me but the Fiery Form works perfectly fine while this isn't.
When more than caster cast this spell, no problem occur. Here's the problem, when one of the caster's water orb's duration end, the special effect which I put it at the end of duration keep spamming at the point until all of caster's water orb's duration end. Can anyone help me with this?