Resurrection

N582114

New Member
Reaction score
2
I've been trying to make this resurrection spell for heroes that die in my map.

I can't find a way to make it work. I need to place the correct number in ResurrectionPoint[Index] & ResurrectionUnit[Index] so that the spell revives the correct unit. The spell is suppose to pick the nearest point where a hero has died, then revive it using 'ResurrectionCount'.

Help is appreciated.

Trigger:
  • Resurrection Unit
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Medic
          • (Unit-type of (Dying unit)) Equal to Shock Trooper
          • (Unit-type of (Dying unit)) Equal to Sniper
          • (Unit-type of (Dying unit)) Equal to Marine
    • Actions
      • Set RessurectingUnit[(Player number of (Owner of (Dying unit)))] = (Dying unit)
      • Set ResurrectingPoint[(Player number of (Owner of (Dying unit)))] = (Position of (Dying unit))
      • Hashtable - Save (Player number of (Owner of (Dying unit))) as 0 of 0 in resHash


Trigger:
  • Resurrection
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Resurrection (Medic)
    • Actions
      • Set Temp_Point = (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[1]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[2]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[3]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[4]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[5]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[6]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[7]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Temp_Point and ResurrectingPoint[8]) Less than or equal to 300.00
        • Then - Actions
          • Trigger - Turn on ResurrectionCount <gen>
          • Trigger - Run ResurrectionCount <gen> (checking conditions)
          • Custom script: call RemoveLocation (udg_Temp_Point)
        • Else - Actions

Trigger:
  • ResurrectionCount
    • Events
      • Time - Every 1.30 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • resurrectioncount[(Load 0 of 0 from resHash)] Equal to 5
        • Then - Actions
          • Hero - Instantly revive RessurectingUnit[(Load 0 of 0 from resHash)] at ResurrectingPoint[(Load 0 of 0 from resHash)], Show revival graphics
          • Set ResurrectingPoint[(Load 0 of 0 from resHash)] = (Point(0.00, 0.00))
          • Trigger - Turn off ResurrectionCount <gen>
        • Else - Actions
          • Special Effect - Create a special effect at ResurrectingPoint[(Load 0 of 0 from (Last created hashtable))] using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set resurrectioncount[(Load 0 of 0 from resHash)] = (resurrectioncount[(Load 0 of 0 from resHash)] + 1)

Trigger:
  • ResurrectionCancel
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Resurrection (Medic)
    • Actions
      • Trigger - Turn off ResurrectionCount <gen>
      • Set beingRezed[(Load 0 of 0 from resHash)] = False
      • Set ResurrectingPoint[(Load 0 of 0 from resHash)] = (Point(0.00, 0.00))
 

jig7c

Stop reading me...-statement
Reaction score
123
your second trigger can be reduced by using Integer loop from 1 to 8
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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