• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to set Respawn For heroes?

Status
Not open for further replies.
Level 5
Joined
Oct 22, 2008
Messages
156
Hello guys, Im on to make an RPG Map ...
But how do i make a Respawn timer, and how to set region and so?...
My Primary Question, How to get a hero respawn out for Altar? :hohum::hohum:
 
Level 22
Joined
Jun 24, 2008
Messages
3,050
You really need to learn something first.
Respawn: Make a region. By making it.
Then create an event wich goes 'Generic unit event' And then 'A unit dies'
Condition: 'Unit type' and then 'Unit type of (triggering unit) equal to YOURHERO'
Action: 'Hero' Revive (triggering unit) at center of YOURREGION
 
Level 5
Joined
Oct 22, 2008
Messages
156
Thanks mate :D!
I know... Hmm but most things i learn by my self but still something i need some profs to tell me ^^ ..

EDIT:
What do i need to set in at 'Unit type' and then 'Unit type of (triggering unit) ??
 
Last edited by a moderator:
Level 13
Joined
Sep 14, 2008
Messages
1,408
What you need is:

1. Area (where the hero is revived)

2. Unit Array (length = number of players)

Important: Set this variable to the hero the players chose. For EVERY player.


3. CountdownTimer Array (lenght = number of players)


And this 2 triggers:

  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (PlayerHero[Player number of (Owner of (Triggering Unit))])
    • Actions
      • Countdown Timer - Start CountDownTimer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 30.00 seconds

This one starts the timer for a player when his hero dies.
You can set the time for whatever you want. (maybe Level * 10 or something)


  • Respawn Timer End
    • Events
      • Time - CountDownTimer[1] expires
    • Conditions
    • Actions
      • Hero - Instantly revive PlayerHero[1] at (YourArea), Show revival graphics
This one will revive the Hero when the timer expires. You need 1 of this for every player. Just change the array index (the number in the []) in each one.

Hope this helps you
 
Level 9
Joined
Apr 3, 2008
Messages
700
Day-Elven you can't use triggering player because you don't have a a triggering player, its a unit, so you must refer to a unit in your actions

I used it and it worked. In this case Owner of triggering unit equal to triggering player.
Strange, but there isn't not many mapmakers who know it. Or I had a bug? Are you sure it didn't work in your map?
Note: It don't work with event like Unit Enters/Leaves region.

But you can use smth like:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Triggering player) Equal to Player 1 (Red)
  • Actions
    • Hero - Add -5 experience to Hero[(Player number of (Triggering player))], Hide level-up graphics
 
Last edited:
Status
Not open for further replies.
Top