Wratox1
Member
- Reaction score
- 22
Hello, ive made this spell called Enchanted Eyes:
Gives the Watcher magical eyes, with these eyes he can spot enemy heroes with low hit points.
and here are my triggers:
but there is one problem with it, it only works one time, and i cant understand why!
can someone help me with this?
Gives the Watcher magical eyes, with these eyes he can spot enemy heroes with low hit points.
and here are my triggers:
Trigger:
- enchanted eyes learn
- Events
- Unit - A unit Learns a skill
- Conditions
- (Learned Hero Skill) Equal to Enchanted Eyes
- Actions
- Trigger - Turn on enchanted eyes start <gen>
- Trigger - Turn on enchanted eyes end <gen>
- Game - Display to (All players) the text: 1
- Trigger - Turn off (This trigger)
- Events
Trigger:
- enchanted eyes start
- Events
- Game - GDD_Event becomes Equal to 0.00
- Conditions
- Actions
- Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (GDD_DamagedUnit is A Hero) Equal to True
- ((Owner of GDD_DamagedUnit) is an enemy of (Owner of enchanted_eyes_hero)) Equal to True
- (Percentage life of GDD_DamagedUnit) Less than or equal to 10.00
- enchanted_eyes_bool Equal to False
- Then - Actions
- Set enchanted_eyes_bool = True
- Countdown Timer - Start enchanted_eyes_timer as a One-shot timer that will expire in (4.00 + ((Real((Level of Enchanted Eyes for enchanted_eyes_hero))) x 4.00)) seconds
- Set enchanted_eyes_target = GDD_DamagedUnit
- Set temp_point = (Position of enchanted_eyes_target)
- Unit - Create 1 enchanted eye dummy for (Owner of enchanted_eyes_hero) at temp_point facing Default building facing degrees
- Set enchanted_eye = (Last created unit)
- Custom script: call RemoveLocation(udg_temp_point)
- Trigger - Turn on enchanted eyes move <gen>
- Game - Display to (All players) the text: 2
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
- Events
Trigger:
- enchanted eyes move
- Events
- Time - Every 0.02 seconds of game time
- Conditions
- Actions
- Set enchanted_eyes_point = (Position of enchanted_eyes_target)
- Unit - Move enchanted_eye instantly to enchanted_eyes_point
- Custom script: call RemoveLocation(udg_enchanted_eyes_point)
- Game - Display to (All players) the text: 3
- Events
Trigger:
- enchanted eyes end
- Events
- Time - enchanted_eyes_timer expires
- Conditions
- Actions
- Trigger - Turn off enchanted eyes move <gen>
- Unit - Remove enchanted_eye from the game
- Set enchanted_eye = No unit
- Set enchanted_eyes_hero = No unit
- Set enchanted_eyes_bool = False
- Game - Display to (All players) the text: 4
- Events
but there is one problem with it, it only works one time, and i cant understand why!
can someone help me with this?