- Joined
- Jul 9, 2008
- Messages
- 253
Hey there, I made a spell called Electric Overload that basicly shoots a chain lightning to everyone in a 500 radius.
The problem is that sometimes I cast the spell there is still a unit that doesn't get a chain lightning in his face.
Here's the trigger:
The problem is that sometimes I cast the spell there is still a unit that doesn't get a chain lightning in his face.
Here's the trigger:
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Electric Overload
-
Actions
- Set temp_unit = (Casting unit)
- Set temp_point = (Position of temp_unit)
-
Unit Group - Pick every unit in (Units within 500.00 of temp_point matching (((Matching unit) belongs to an enemy of (Owner of temp_unit)) Equal to True)) and do (Actions)
-
Loop - Actions
- Set temp_unit_target = (Picked unit)
- Unit - Create 1 dummy for (Owner of temp_unit) at temp_point facing Default building facing degrees
- Set temp_unit_spawned = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to temp_unit_spawned
- Unit - Order temp_unit_spawned to Orc Far Seer - Chain Lightning temp_unit_target
-
Loop - Actions
- Custom script: call RemoveLocation(udg_temp_point)
- Custom script: set udg_temp_unit = null
- Custom script: set udg_temp_unit_target = null
- Custom script: set udg_temp_unit_spawned = null