• 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.

[Trigger] hero revive skill

Status
Not open for further replies.
Level 3
Joined
Jan 22, 2008
Messages
39
i need some ideas or help how to do a hero revival skill, i just triggered that a Tombstone will spawn for a dying hero at his position but now i need an idea how to revieve the fallen hero at that location, any ideas?
 
Solution

Well an easy way to do it would be to create a Unit based off of the tavern.
This "Tavern" shouldnt sell any units, and if it's a tombstone, modify the pathing to be a bit smaller. Change the icon and model file to the "tombstone" that you want. Be sure that this "Tavern" can revive your unit (It should automatically be able to do this). Also, you need a unit variable(unit array if there will be many players using this revival tavern) for later use. Ok now for the triggers.


  • Create Tombstone for Dying unit
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Unit - Create 1 "Tombstone" for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
      • Set "Created Unit Array"[(Player number of (Owner of (Dying unit)))] = (Last created unit)
  • Remove Tombstone after revival
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
    • Actions
      • Unit - Remove "Created Unit Array"[(Player number of (Owner of (Reviving Hero)))] from the game
If this is for a single player, the Unit array should just be a single unit variable. You can set the array through the actual variable. (Check the array box and leave it as 0). If you need further help, feel free to contact me. The information is on my profile. Hope I helped
 
Level 3
Joined
Jan 22, 2008
Messages
39
no i mean like KaiserG thought of
if your hero dies some other hero (cleric) can resurect him

because if a hero dies a tombstone spawns at his dyind loacation, and so he can be ressurectet by the "cleric"
or if 30 seconds pass he will be revieved automaticaly in the town, and the tombstone wil be removed
 
  • Events: A unit dies
  • Conditions: Triggering unit is a hero equal to true
  • Actions:
  • Hero - Create Revive Stone at Position of Dying unit
  • Item - Set Custom Value of Last Created Item to Integer(PlayerNumberOfOwnerOf(Triggering Unit))
  • wait 30 seconds
  • if then else
  • if triggering unit is dead equal to true
  • then-actions
  • Hero - Revive Triggering unit at Position of Triggering unit
  • else-actions
This might help

and for the spell

  • Events: A unit begins casting an ability
  • Conditions: Ability being cast equal to *ReviveAbility*
  • Actions:
  • ------ Check items in range here ------
 
Status
Not open for further replies.
Top