I'm creating a Circle Revive System in my map. Little explaination: When Heroes of any escaper kind die, a circle of power will spawn at their corpse. Once another living hero passes over the circle, the dead hero will revive again.
I've got this first trigger...
And now I want to create another trigger which checks when a (Friendly Hero) unit comes in range with Circle_Unit[Integer A], and then to eventually revive them.
But I already got stuck at the event: A unit comes within range, -- as I can't use variables in that one.
Any help to create the Revive Trigger is appreciated (or perhaps if there is a guide how to make such a system which I haven't found yet with the MAGICAL SEARCH BUTTON).
I've got this first trigger...
Code:
Create Circle
Events
Unit - A unit Dies
Conditions
(((Dying unit) is A Hero) Equal to True) and (((Owner of (Dying unit)) is an enemy of Player 12 (Brown)) Equal to True)
Actions
Set Point_Circle = (Position of (Dying unit))
Unit - Create 1 Revive Circle for (Owner of (Dying unit)) at Point_Circle facing Default building facing degrees
Custom script: call RemoveLocation(udg_Point_Circle)
If ((Owner of (Dying unit)) Equal to Player 1 (Red)) then do (Set Circle_Unit[1] = (Last created unit)) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to Player 2 (Blue)) then do (Set Circle_Unit[2] = (Last created unit)) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to Player 3 (Teal)) then do (Set Circle_Unit[3] = (Last created unit)) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to Player 4 (Purple)) then do (Set Circle_Unit[4] = (Last created unit)) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to Player 5 (Yellow)) then do (Set Circle_Unit[5] = (Last created unit)) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to Player 6 (Orange)) then do (Set Circle_Unit[6] = (Last created unit)) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to Player 7 (Green)) then do (Set Circle_Unit[7] = (Last created unit)) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to Player 8 (Pink)) then do (Set Circle_Unit[8] = (Last created unit)) else do (Do nothing)
And now I want to create another trigger which checks when a (Friendly Hero) unit comes in range with Circle_Unit[Integer A], and then to eventually revive them.
But I already got stuck at the event: A unit comes within range, -- as I can't use variables in that one.
Any help to create the Revive Trigger is appreciated (or perhaps if there is a guide how to make such a system which I haven't found yet with the MAGICAL SEARCH BUTTON).