- Joined
- Nov 11, 2004
- Messages
- 50
Hello I'm currently making a spell that takes 50% of the target enemy heros intelligence for and gives it to the caster for 60 seconds. Now the problem is that the intelligence wont go back to normal after 60 seconds, the caster has the bonus intelligence while the target enemy hero still has the lost intelligence.
Heres my trigger I cant see why it doesnt work
Part 1:
Part 2:
Heres my trigger I cant see why it doesnt work
Part 1:
PHP:
Static Intelligence
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Static Intelligence (Thunder Watcher Starter Ability)
Actions
Set TW_StaticIntelPoint = (Position of (Casting unit))
Set TW_StaticIntelCaster = (Casting unit)
Set TW_StaticIntellEnemy = (Target unit of ability being cast)
Hero - Modify Intelligence of TW_StaticIntelCaster: Add (Integer(((Real((Intelligence of TW_StaticIntellEnemy (Exclude bonuses)))) x 0.50)))
Hero - Modify Intelligence of TW_StaticIntellEnemy: Subtract (Integer(((Real((Intelligence of TW_StaticIntellEnemy (Exclude bonuses)))) x 0.50)))
Countdown Timer - Start TW_StaticChallengeTimer as a One-shot timer that will expire in 60.00 seconds
Floating Text - Create floating text that reads (String(((Real((Intelligence of TW_StaticIntellEnemy (Exclude bonuses)))) x 0.50))) at TW_StaticIntelPoint with Z offset 10.00, using font size 10.00, color (50.00%, 50.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
Part 2:
PHP:
Static Intelligence Over
Events
Time - TW_StaticChallengeTimer expires
Conditions
Actions
Set TW_StaticIntelCaster = (Casting unit)
Set TW_StaticIntellEnemy = (Target unit of ability being cast)
Hero - Modify Intelligence of TW_StaticIntellEnemy: Add (Integer(((Real((Intelligence of TW_StaticIntellEnemy (Exclude bonuses)))) x 0.50)))
Hero - Modify Intelligence of TW_StaticIntelCaster: Subtract (Integer(((Real((Intelligence of TW_StaticIntellEnemy (Exclude bonuses)))) x 0.50)))