How to make store Hero Save Respawn Point?

NightFelix

Active Member
Reaction score
1
How to make store Hero Save Respawn Point??

For example:
A Hero enter town_P(save the hero respawn point at town_P automatically), so when the Hero die, it will respawn at town_P;

When the Hero reach to another town_Q(save the hero respawn point at town_Q automatically), so when the Hero die, it will respawn at town_Q and no longer respawn at town_P.

Edit:
I have created the trigger at #8
 

blooman

New Member
Reaction score
16
you should have a different value for each town
Like make 1 town a integer of 1
make town 2 a integer of 2
then
Event
A unit Dies
Conditions Unit = to Hero
Integer = (town number)
Actions
Revive hero at Town number
 

D.V.D

Make a wish
Reaction score
73
You could do this:

Trigger:
  • Reigon Enter
    • Events
      • Unit - A unit enters (Current camera bounds)
    • Conditions
    • Actions
      • Set Hero = (Triggering unit)
      • Set integer[(Player number of (Owner of Hero))] = 1

Trigger:
  • Revive
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • integer[(Player number of (Owner of (Triggering unit)))] Equal to 1
        • Then - Actions
          • Wait 5.00 seconds
          • Hero - Instantly revive (Triggering unit) at Reigon1, Show revival graphics
        • Else - Actions


You need to set each reigon to a different integer value. You also need to make another enter reigon trigger and set it to the integer and also, you need another If/then/else for each reigon and change were she revives.
 

simonake

New Member
Reaction score
72
It's not to offense you but,
Hero - Instantly revive (Triggering unit) at Reigon1, Show revival graphics

-> Leaking

You could make a large region covering the place that if unit dies it respawn somewhere in the region. Like unit dies
Conditions, if unit is in(playable map area) then...
 

D.V.D

Make a wish
Reaction score
73
I never said its leakless. And I think he can clear the leaks himself.
 

NightFelix

Active Member
Reaction score
1
Reply to kc102

Eh? The Player 1 (Red) and the rest of the player only able to have one Hero. So the answer will be, one dying Hero that owned by that player.

Reply to blooman

This part looks confusing.
Integer = (town number)
Actions
Revive hero at Town number

Reply to D.V.D

I will reply to you later when I have more problem with the trigger. Trying out now.

Reply to simonake

Seriously, I have no idea what is leaks, is there any tutorial to let me learn what is leaks?
 

NightFelix

Active Member
Reaction score
1
New someone to help check with this.(My timer seems to be have some bug when 2 hero die at the same time, it won't destroy the timer window)

When Hero Enter Town 1
Trigger:
  • Town 1
    • Events
      • Unit - A unit enters Town1 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set SaveHeroUnit = (Entering unit)
      • Set SaveLocationInteger[(Player number of (Owner of SaveHeroUnit))] = 1


When Hero Enter Town 2
Trigger:
  • Town 2
    • Events
      • Unit - A unit enters Town2 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set SaveHeroUnit = (Entering unit)
      • Set SaveLocationInteger[(Player number of (Owner of SaveHeroUnit))] = 2


Hero Revive System
Trigger:
  • Hero Revive System
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SaveLocationInteger[(Player number of (Owner of SaveHeroUnit))] Equal to 1
        • Then - Actions
          • Countdown Timer - Create a timer window for RevivalTimer with title Respawn in
          • Countdown Timer - Show RevivalTimerWindow for (Owner of (Dying unit))
          • Countdown Timer - Start RevivalTimer as a One-shot timer that will expire in 5.00 seconds
          • Set RevivalTimerWindow = (Last created timer window)
          • Wait 5.00 game-time seconds
          • Hero - Instantly revive (Dying unit) at (Center of Town1 <gen>), Show revival graphics
          • Camera - Pan camera for (Owner of (Dying unit)) to (Center of Town1 <gen>) over 0.00 seconds
          • Countdown Timer - Destroy (Last created timer window)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SaveLocationInteger[(Player number of (Owner of SaveHeroUnit))] Equal to 2
        • Then - Actions
          • Countdown Timer - Create a timer window for RevivalTimer with title Respawn in
          • Countdown Timer - Show RevivalTimerWindow for (Owner of (Dying unit))
          • Countdown Timer - Start RevivalTimer as a One-shot timer that will expire in 5.00 seconds
          • Set RevivalTimerWindow = (Last created timer window)
          • Wait 5.00 game-time seconds
          • Hero - Instantly revive (Dying unit) at (Center of Town2 <gen>), Show revival graphics
          • Camera - Pan camera for (Owner of (Dying unit)) to (Center of Town2 <gen>) over 0.00 seconds
          • Countdown Timer - Destroy (Last created timer window)
        • Else - Actions
          • Do nothing
 
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