- Joined
- Jul 20, 2009
- Messages
- 295
As said in the Title, I am having a problem with my spell.
My spell is about:
-When someone casts "StoneSkin" he receives 0 damage what so ever until after 30 seconds or the sheild has been destroyed as it has a life of, 40 x Lvl of StoneSkin Spell.
My problem is:
-Everything works fine, except that when the caster has a full Life and casts "StoneSkin", he takes damage until the caster's Life is less than 100%, then the system would work fine. I do not want this to happen, I want the spell to absorb all damages even if the caster's life is at 100%. I also tried to check and see if it's only for the first hit that spell does not get to work, by letting the unit's Life gets to 100% when I press Esc... still the same, when at 100% Life of the unit the spell does not work correctly.
Here are the Triggers:
Thats all.
+Rep for the helper/fixer.
My spell is about:
-When someone casts "StoneSkin" he receives 0 damage what so ever until after 30 seconds or the sheild has been destroyed as it has a life of, 40 x Lvl of StoneSkin Spell.
My problem is:
-Everything works fine, except that when the caster has a full Life and casts "StoneSkin", he takes damage until the caster's Life is less than 100%, then the system would work fine. I do not want this to happen, I want the spell to absorb all damages even if the caster's life is at 100%. I also tried to check and see if it's only for the first hit that spell does not get to work, by letting the unit's Life gets to 100% when I press Esc... still the same, when at 100% Life of the unit the spell does not work correctly.
Here are the Triggers:
-
StoneSkin Setup
-
Events
- Time - Elapsed game time is 0.01 seconds
- Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
- Trigger - Add to StoneSkin Spell <gen> the event (Unit - (Picked unit) Takes damage)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Events
-
StoneSskin Setup2
-
Events
- Unit - A unit enters (Playable map area)
- Conditions
-
Actions
- Trigger - Add to StoneSkin Spell <gen> the event (Unit - (Triggering unit) Takes damage)
-
Events
-
StoneSkinStartup
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to StoneSkin (Hero)
-
Actions
- Set StoneSkin[(Player number of (Owner of (Triggering unit)))] = (40 x (Level of StoneSkin (Hero) for (Triggering unit)))
-
Events
-
StoneSkin Spell
- Events
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Attacked unit) has buff StoneSkin (Hero)) Equal to True
-
Then - Actions
- Set Dmg_Array = (Dmg_Array + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StoneSkin[(Player number of (Owner of (Attacked unit)))] Greater than or equal to (Integer((Damage taken)))
-
Then - Actions
- Set StoneSkin[(Player number of (Owner of (Attacked unit)))] = (StoneSkin[(Player number of (Owner of (Attacked unit)))] - (Integer((Damage taken))))
- Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + (Damage taken))
- Floating Text - Create floating text that reads 0 at ((Position of (Attacked unit)) offset by 0.00 towards (Real(Dmg_Position[Dmg_Array])) degrees) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 25.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 50.00 towards (Real(Dmg_Position[Dmg_Array])) degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
Else - Actions
- Unit - Remove StoneSkin (Hero) buff from (Attacked unit)
- Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + (Real(StoneSkin[(Player number of (Owner of (Attacked unit)))])))
- Floating Text - Create floating text that reads (String(((Integer((Damage taken))) - StoneSkin[(Player number of (Owner of (Attacked unit)))]))) at ((Position of (Attacked unit)) offset by 0.00 towards (Real(Dmg_Position[Dmg_Array])) degrees) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 25.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 50.00 towards (Real(Dmg_Position[Dmg_Array])) degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
- Set StoneSkin[(Player number of (Owner of (Attacked unit)))] = 0
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Dmg_Array Greater than or equal to 4
-
Then - Actions
- Set Dmg_Array = 0
- Else - Actions
-
If - Conditions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Attacked unit) has buff StoneSkin (Hero)) Equal to False
-
Then - Actions
- Set Dmg_Array = (Dmg_Array + 1)
- Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at ((Position of (Attacked unit)) offset by 0.00 towards (Real(Dmg_Position[Dmg_Array])) degrees) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 25.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 50.00 towards (Real(Dmg_Position[Dmg_Array])) degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Dmg_Array Greater than or equal to 4
-
Then - Actions
- Set Dmg_Array = 0
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
+Rep for the helper/fixer.
Last edited: