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

WOW Resurrection System

Status
Not open for further replies.
Level 15
Joined
Jan 27, 2007
Messages
948
Hello, i'm working on the proyect WOW RPG, you can check it out in my sign.
now im doing the ress system, if you ever played WOW you should know how it works.

I'm making it like this:
there are 5 regions in azeroth, if you die in X region, you will appear in X spirit healer, if you are a night elf, you will be a wisp, else a soul.
you can ress at the spirit healer by buying an item, or at your body by getting close to it's grave(when you die a grave is created).
NOTE: Spirit healers are invisible, and when you die you get an alliance which make you see it temporaly until you revive and destroy the treat.

here the triggers i made for now:
  • Actions
    • Set DeadHero = (Dying unit)
    • Player - Make (Owner of (Dying unit)) treat Player 12 (Brown) as an Ally
    • Player - Make Player 12 (Brown) treat (Owner of (Dying unit)) as an Ally
    • Unit - Create 1 Grave for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Dying unit)) Equal to Warrior
        • (Unit-type of (Dying unit)) Equal to Rogue
        • (Unit-type of (Dying unit)) Equal to Hunter
        • (Unit-type of (Dying unit)) Equal to Priest
        • (Unit-type of (Dying unit)) Equal to Druid
      • Then - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Eastern Kingdoms SOUTH <gen> contains (Dying unit)) Equal to True
          • Then - Actions
            • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Position of Spirit Healer 0162 <gen>) facing Default building facing degrees
            • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0162 <gen>) over 0.30 seconds
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Eastern Kingdoms NORTH <gen> contains (Dying unit)) Equal to True
              • Then - Actions
                • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Position of Spirit Healer 0206 <gen>) facing Default building facing degrees
                • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0206 <gen>) over 0.30 seconds
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Kalimdor NORTH <gen> contains (Dying unit)) Equal to True
                  • Then - Actions
                    • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Position of Spirit Healer 0207 <gen>) facing Default building facing degrees
                    • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0207 <gen>) over 0.30 seconds
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Kalimdor CENTER <gen> contains (Dying unit)) Equal to True
                      • Then - Actions
                        • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Position of Spirit Healer 0208 <gen>) facing Default building facing degrees
                        • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0208 <gen>) over 0.30 seconds
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Kalimdor SOUTH <gen> contains (Dying unit)) Equal to True
                          • Then - Actions
                            • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Position of Spirit Healer 0211 <gen>) facing Default building facing degrees
                            • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0211 <gen>) over 0.30 seconds
                          • Else - Actions
                            • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Center of (Playable map area)) facing Default building facing degrees
                            • Camera - Pan camera for (Owner of (Dying unit)) to (Center of (Playable map area)) over 0.30 seconds
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Eastern Kingdoms SOUTH <gen> contains (Dying unit)) Equal to True
          • Then - Actions
            • Unit - Create 1 Soul for (Owner of (Dying unit)) at (Position of Spirit Healer 0162 <gen>) facing Default building facing degrees
            • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0162 <gen>) over 0.30 seconds
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Eastern Kingdoms NORTH <gen> contains (Dying unit)) Equal to True
              • Then - Actions
                • Unit - Create 1 Soul for (Owner of (Dying unit)) at (Position of Spirit Healer 0206 <gen>) facing Default building facing degrees
                • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0206 <gen>) over 0.30 seconds
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Kalimdor NORTH <gen> contains (Dying unit)) Equal to True
                  • Then - Actions
                    • Unit - Create 1 Soul for (Owner of (Dying unit)) at (Position of Spirit Healer 0207 <gen>) facing Default building facing degrees
                    • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0207 <gen>) over 0.30 seconds
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Kalimdor CENTER <gen> contains (Dying unit)) Equal to True
                      • Then - Actions
                        • Unit - Create 1 Soul for (Owner of (Dying unit)) at (Position of Spirit Healer 0208 <gen>) facing Default building facing degrees
                        • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0208 <gen>) over 0.30 seconds
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Kalimdor SOUTH <gen> contains (Dying unit)) Equal to True
                          • Then - Actions
                            • Unit - Create 1 Soul for (Owner of (Dying unit)) at (Position of Spirit Healer 0211 <gen>) facing Default building facing degrees
                            • Camera - Pan camera for (Owner of (Dying unit)) to (Position of Spirit Healer 0211 <gen>) over 0.30 seconds
                          • Else - Actions
                            • Unit - Create 1 Soul for (Owner of (Dying unit)) at (Center of (Playable map area)) facing Default building facing degrees
                            • Camera - Pan camera for (Owner of (Dying unit)) to (Center of (Playable map area)) over 0.30 seconds
  • Spirit Healer Res
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Resurrect Me
    • Actions
      • Hero - Instantly revive DeadHero at (Position of (Buying unit)), Show revival graphics
      • Unit - Kill (Buying unit)
      • Player - Make (Owner of (Dying unit)) treat Player 12 (Brown) as an Enemy
      • Player - Make Player 12 (Brown) treat (Owner of (Dying unit)) as an Enemy
but for some reason, it doesn't work.
and the ress by getting close to the grave, i didn't even know how to start it.
REMEMBER: it must be from player 1 to 8

if someone can help me, ill be really thankful.
and ill give +rep with no doubt.
 
Level 5
Joined
Nov 14, 2007
Messages
161
you basically answered your own question...

make a tirgger that when a hero dies, you set the point he died to a varriable (probably an arrray matching the player number)

then set the spawned spirit etc to a unit varriable[array by player number] and periodically have a loop go that checks if unit[loopA] is within 600 range of Point[loopA] , give option to ress.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
There's an event for this.

Unit comes within X of unit

You can use that instead of a point, but I'm not sure if it also activates if the unit is dead. If it doesn't, you just have to create a dummy at the place he died. When the ghost comes within X range of the dummy unit, you can make a dialog pop up (Or make a text and trigger like 'press Up arrow key to resurrect', which you remove when the unit gets out of range), so you can choose to resurrect. At that point, you remove the dummy unit and the ghost, and you resurrect the hero.
 
Level 15
Joined
Jan 27, 2007
Messages
948
There's an event for this.

Unit comes within X of unit

You can use that instead of a point, but I'm not sure if it also activates if the unit is dead. If it doesn't, you just have to create a dummy at the place he died. When the ghost comes within X range of the dummy unit, you can make a dialog pop up (Or make a text and trigger like 'press Up arrow key to resurrect', which you remove when the unit gets out of range), so you can choose to resurrect. At that point, you remove the dummy unit and the ghost, and you resurrect the hero.

thats the problem, the dummy; as i said, when you die it creates a grave, but how the hell im suppossed to know what grave you must come close? the grave just appear when you die, it doesn't exist.
try to do it and u'll understand me.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You just make a trigger that causes a unit (with or without skin of your choice) to be created at the position of the dying unit, and set a variable to it. Make another trigger that activates when you come in range of the unit you just created. I believe that you need JASS to use variables in Events, but I'm not familiar on that area.
 
Level 8
Joined
Jul 22, 2008
Messages
331
If I understood correctly...
When you die you have to set point

Example:

  • Trigger 1
  • Events
    • Unit - Unit dies
  • Conditions
    • (Dying unit) equal to (my Hero1)
  • Actions
    • Set (tempPoint1) position of (my hero1)
    • Special Effect - Create special effect at the (tempPoint1) using (Grave model)
    • Set Grave1 = (Last created special effect)
    • Unit - Create 1 Spirit for Owner of (my hero1) at (SomeOtherPoint) facing default building degrees
    • Trigger - Turn on Trigger 2
All you have to do thenn is to move your spirit to the grave and when unit enters region where the grave is this trigger is triggered

  • Trigger 2
  • Events
    • Time - Every 4 seconds of the game time
  • Conditions
  • Actions
    • If all conditions are true (then actions) else (else actions)
      • If (Conditions)
        • (Spirit) comes in 500 range of tempPoint1
      • Then (Actions)
        • COMMENT: |||||||||||||||||||||||Some your actions that will ressurect you Hero.||||||||||||||||||||||
        • Special Effect - Destroy (Grave1)
        • Custom script: Call_RemoveLocation(udg_tempPoint1)
 
Level 8
Joined
Jul 22, 2008
Messages
331
well, i've putted "1" next to variables...
I mean, create a array variable for your heroes, for dying points and then just do this

set myhero1 - blademaster
set myhero2 - archmage
set myhero3 - Far Seer
.
.
.
then just use triggers i posted...
 
Level 15
Joined
Jan 27, 2007
Messages
948
well, i've putted "1" next to variables...
I mean, create a array variable for your heroes, for dying points and then just do this

set myhero1 - blademaster
set myhero2 - archmage
set myhero3 - Far Seer
.
.
.
then just use triggers i posted...

yeahh, i think that would work, and abotu this

  • (Dying unit) equal to (my Hero1)
do i have to put like this?

  • (Dying unit) equal to (my Hero1)
  • (Dying unit) equal to (my Hero2)
  • (Dying unit) equal to (my Hero3)
etc...

and what about this

  • Actions
  • Set (tempPoint1) position of (my hero1)
what do i have to put?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You need all If/Then/Else triggers.
  • If (All conditions are true) then do (Then actions), else do (Else actions)
    • If
      • Unit - (Dying unit) equal to (my Hero[1])
    • Then
      • Pick your nose
    • Else
      • If
        • Unit - (Dying unit) equal to (my Hero[2])
      • Then
        • Wear a funny hat
      • Else
        • etc.
Or you can just make the If/Then/Else triggers apart.
  • If (All conditions are true) then do (Then actions), else do (Else actions)
    • If
      • Unit - (Dying unit) equal to (my Hero[1])
    • Then
      • Pick your nose
    • Else
  • If (All conditions are true) then do (Then actions), else do (Else actions)
    • If
      • Unit - (Dying unit) equal to (my Hero[2])
    • Then
      • Wear a funny hat
    • Else
      • etc.
And the TempPoint best stay arrays too, just like the heroes. If you don't, then you can't have a correct trigger if multiple heroes are dead. So just add TempPoint[1] to my Hero[1], TempPoint[2] to my Hero[2], etc.
 
Status
Not open for further replies.
Top