Revive per round

snowfool

New Member
Reaction score
1
ok in my game the level changes when a unit eneters a region but i need it so that when that unit enters the region everyone is revived in random spots around the map please help me out with this trigger(s) thanks!
 

Bankde

Member
Reaction score
20
Try this one

Trigger:
  • Revive
    • Events
      • Unit - A unit enters "Your Region"
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit Group - Pick every unit in "Dying Heroes Group" and do (Actions)
        • Loop - Actions
          • Set Point = (Random point in "Your Area")
          • Hero - Instantly revive (Picked unit) at Point, Hide revival graphics
          • Custom script: call RemoveLocation (udg_Point)


Make sure you create unit group variable and then put dying heroes in there.

Or... make all heroes unit variable and then pick all dying hero to revive.
 

Aniconic

I am the very model of a modern major general!
Reaction score
3
how do i make units in a vairible?

Make another trigger that adds dead units to that unit group:
Trigger:
  • Dead Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Dying unit) to Dying_Heroes_Group


Also, in the previous trigger, don't forget to clear the group leak!

Trigger:
  • Revive
    • Events
      • Unit - A unit enters "Your Region"
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit Group - Pick every unit in Dying_Heroes_Group and do (Actions)
        • Loop - Actions
          • Set Point = (Random point in "Your Area")
          • Hero - Instantly revive (Picked unit) at Point, Hide revival graphics
          • Custom script: call RemoveLocation (udg_Point)
      • Custom script: DestroyGroup(udg_Dying_Heroes_Group)
 
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