Creating a Circle Revive System

Razed

New Member
Reaction score
44
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...

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). :)
 

Curo

Why am I still playing this game...?
Reaction score
109
In your first trigger, after you create each circle, you have to add to the second trigger the event "unit comes in range of last created unit".
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top