• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Resurrection stones

Status
Not open for further replies.
Level 4
Joined
Jun 30, 2014
Messages
72
Ankhs are an item.

The resurrection stones in the orc bonus campaign are those monument stones with a symbol on the front. If you walk the hero near one, it lights up and becomes the revive point for the hero.

Figured out a few things...
It's the resurrection stone unit, not the doodad.
The glowing stuff is an alternate stand animation. About that...

Does anyone know the animation names? ex. "stand", "throw", etc.

(I'm going to try "stand, alternate" and see what happens.)

EDIT: I used "stand alternate" (no comma) and it works as an animation name.
 
Last edited by a moderator:
Level 6
Joined
Apr 5, 2015
Messages
166
Figured out a few things...
It's the resurrection stone unit, not the doodad.
The glowing stuff is an alternate stand animation. About that...

Does anyone know the animation names? ex. "stand", "throw", etc.

(I'm going to try "stand, alternate" and see what happens.)

EDIT: I used "stand alternate" (no comma) and it works as an animation name.

You can also figure the animations out by looking at the preview of the model in the WE. There is always a little "Animation" button above it.
This model for example has 3 animations: Stand, Stand Alternate & Stand Work
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Blizzard did it simply.
1) Placed stones in game, each stone is given a number (just on a paper).
2) There is an integer variable into which the number of the stone is set when the stone is activated (let's call it ActiveStone).
3) Placed large region around the stone - this region is used to detect units
4) When unit enters this region, it is checked if it is correct unit and if the ActiveStone value is not the same as the number of the stone the unit approached (if it is, then the stone has already been activated).
5) There are two other regions - one directly underneath the resurrection stone and another nearby the stone (the second one is where hero is resurrected).
6) Play effects, sounds, animations for activated stone, also set into global variables the number of the stone and the resurrection spot.
7) Destroy visibility modifier of previously activated stone, create new one centered around the region right underneath the resurrection stone

Now when hero dies, you simply wait a few secs and then resurrect him at the location you saved in step 6.
 
Level 4
Joined
Jun 30, 2014
Messages
72
Thanks.

I have the beginning of this system in place already. Your advice tells me where to go from there, which is exactly what I needed.

Kudos.

EDIT: Could you make an example trigger for that? I get the basic idea, but...
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,378
These are the triggers from the first map of the campaign. Do note that there are 8 stones total, so some triggers have 7 other copies.

This detects unit that approaches the stone and checks if the stone should be activated or not:
  • Approach Resurrection Stone 01
    • Events
      • Unit - A unit enters Resurrection Stone 01 Tripwire <gen>
    • Conditions
      • GameOver Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • (ChenInParty Equal to True) and ((Entering unit) Equal to Chen)
          • (RexxarInParty Equal to True) and ((Entering unit) Equal to Rexxar)
          • (RokhanInParty Equal to True) and ((Entering unit) Equal to Rokhan)
      • ResurrectionStonePicked Not equal to 1
    • Actions
      • Trigger - Run Pick Resurrection Stone 01 <gen> (checking conditions)
      • Trigger - Run Resurrection Stone Picked Effect <gen> (checking conditions)
This activates the stone:
  • Pick Resurrection Stone 01
    • Events
    • Conditions
      • ResurrectionStonePicked Not equal to 1
    • Actions
      • Set ResurrectionStonePicked = 1
      • -------- Update --------
      • Set ResurrectionStoneSpot = (Center of Resurrection Stone 01 <gen>)
      • Set ResurrectionSpot = (Center of Resurrection Stone 01 Spot <gen>)
      • -------- Animation --------
      • Animation - Play ResurrectionStone's stand animation
      • Set ResurrectionStone = Resurrection Stone (southwest facing) 0247 <gen>
      • Animation - Play ResurrectionStone's stand alternate animation
      • -------- Effects --------
      • Trigger - Run Resurrection Stone Update Visibility <gen> (checking conditions)
This does all the neat stuff around stone's activation (effects, etc.):
  • Resurrection Stone Picked Effect
    • Events
    • Conditions
    • Actions
      • -------- Local variables used - don't add waits without consulting Mik --------
      • Custom script: local effect changeEffect
      • Cinematic - Ping minimap for (All players) at ResurrectionStoneSpot for 3.00 seconds, using a Simple ping of color (100.00%, 80.00%, 20.00%)
      • Camera - Set a spacebar-point for AP1_Player at ResurrectionStoneSpot
      • Special Effect - Create a special effect at ResurrectionStoneSpot using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • Set ResurrectionChangeEffectLocal = (Last created special effect)
      • Sound - Play ShimmeringPortalEntrance <gen> at 100.00% volume, located at ResurrectionStoneSpot with Z offset 0.00
      • Custom script: set changeEffect = udg_ResurrectionChangeEffectLocal
      • Wait 4.00 game-time seconds
      • Custom script: set udg_ResurrectionChangeEffectLocal = changeEffect
      • Special Effect - Destroy ResurrectionChangeEffectLocal
This updates the visibility modifier of the stone:
  • Resurrection Stone Update Visibility
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ResurrectionVMExists Equal to True
        • Then - Actions
          • Visibility - Destroy ResurrectionVM
        • Else - Actions
      • Visibility - Create an initially Enabled visibility modifier for AP1_Player emitting Visibility from ResurrectionStoneSpot to a radius of 512.00
      • Set ResurrectionVM = (Last created visibility modifier)
      • Set ResurrectionVMExists = True
And last, this is the actual resurrection trigger:
  • Resurrection Effect
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • -------- Local variables used - don't add waits without consulting Mik --------
      • Custom script: local location revSpot
      • Set ResurrectionSpotLocal = ResurrectionSpot
      • Custom script: set revSpot = udg_ResurrectionSpotLocal
      • Wait 6.00 game-time seconds
      • Custom script: set udg_ResurrectionSpotLocal = revSpot
      • Cinematic - Ping minimap for (All players) at ResurrectionSpotLocal for 5.00 seconds
      • Camera - Set a spacebar-point for AP1_Player at ResurrectionSpotLocal
      • Hero - Instantly revive (Dying unit) at ResurrectionSpotLocal, Show revival graphics
 
Level 4
Joined
Jun 30, 2014
Messages
72
Same ends, different means

So... I did this. AFAIK there is nothing wrong with this, except I haven't leak cleaned (anything in the map I'm making) yet. Actually, help with leak cleaning would be appreciated.

Variables:

This is run from the Initialization trigger, it does 3 things.
-Sets the revive locations to an array
-Sets the stones to an array
-Gives the trigger for going near a stone its trigger event
  • Set Revives
    • Events
    • Conditions
    • Actions
      • -------- Set Revive Locations --------
      • Set Revive_LOC[1] = Rstone 1 LOC <gen>
      • Set Revive_LOC[2] = Rstone 2 LOC <gen>
      • Set Revive_LOC[3] = Rstone 3 LOC <gen>
      • -------- Set Stones --------
      • Set Revive_Stones[1] = Resurrection Stone (southeast facing) 0019 <gen>
      • Set Revive_Stones[2] = Resurrection Stone (southeast facing) 0030 <gen>
      • Set Revive_Stones[3] = Resurrection Stone (southeast facing) 0029 <gen>
      • -------- Add Entry Events to Triggers --------
      • Trigger - Add to Stone Activate 1 <gen> the event (Unit - A unit comes within 256.00 of Revive_Stones[1])
      • Trigger - Add to Stone Activate 2 <gen> the event (Unit - A unit comes within 256.00 of Revive_Stones[2])
      • Trigger - Add to Stone Activate 3 <gen> the event (Unit - A unit comes within 256.00 of Revive_Stones[3])
There is one of these for each stone, it does a few things.
  • Stone Activate 1
    • Events
    • Conditions
      • Number_Rstone Not equal to 1
      • ((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • -------- Remove old stone --------
      • Visibility - Destroy Rstone_Visible
      • Animation - Reset Active_Rstone's animation
      • Set Active_Rstone = No unit
      • -------- Record current stone --------
      • Set Active_Rstone = Revive_Stones[1]
      • Set Number_Rstone = 1
      • Animation - Play Active_Rstone's stand alternate animation
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from (Position of Active_Rstone) to a radius of 300.00
      • Set Rstone_Visible = (Last created visibility modifier)
This trigger activates a timer for each hero who dies, and gives a trigger event to the actual revive trigger.
(Yes, I could have used a "wait for condition" to put all of this in one trigger. I've done that before.)
  • Revival Time
    • Events
    • Conditions
    • Actions
      • Camera - Pan camera for Player 1 (Red) to (Position of Active_Rstone) over 0.00 seconds
      • Animation - Play Active_Rstone's stand work animation
      • Countdown Timer - Destroy Rtimer_Window[Dead_Hero_Count]
      • Hero - Instantly revive Revive_Hero[Dead_Hero_Count] at (Center of Revive_LOC[Number_Rstone]), Show revival graphics
      • Set Dead_Hero_Count = (Dead_Hero_Count - 1)
There are not one but two failsafes for this trigger. This prevents the counting system from doing weird things (unlikely but possible:
  • Revival Failsafe
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Dead_Hero_Count Less than 0
              • Dead_Hero_Count Greater than 3
        • Then - Actions
          • For each (Integer A) from 1 to 3, do (Actions)
            • Loop - Actions
              • Hero - Instantly revive Revive_Hero[(Integer A)] at (Position of Revive_Stones[Number_Rstone]), Show revival graphics
        • Else - Actions
          • Do nothing
This is for the remote possibility that I've created a giant mess and the triggers go horribly wrong (panic button!)
  • Revival Text Failsafe
    • Events
      • Player - Player 1 (Red) types a chat message containing -revive as An exact match
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Hero - Instantly revive Revive_Hero[(Integer A)] at (Player 1 (Red) start location), Hide revival graphics
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Everytime you use this action

Position of
  • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from (Position of Active_Rstone) to a radius of 300.00
or this

Position of
  • Camera - Pan camera for Player 1 (Red) to (Position of Active_Rstone) over 0.00 seconds
or this

Center of
  • Hero - Instantly revive Revive_Hero[Dead_Hero_Count] at (Center of Revive_LOC[Number_Rstone]), Show revival graphics
or this

Position of
  • Hero - Instantly revive Revive_Hero[(Integer A)] at (Position of Revive_Stones[Number_Rstone]), Show revival graphics
it causes leak and you clean them by storing the position like this

  • Set tempLoc = (Position of Active_Rstone)
and remove them by doing this

  • Custom script: call RemoveLocation(udg_tempLoc)
so it would be like this

  • Stone Activate 1
  • Events
  • Conditions
    • Number_Rstone Not equal to 1
    • ((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
    • ((Triggering unit) is A Hero) Equal to True
  • Actions
    • -------- Remove old stone --------
    • Visibility - Destroy Rstone_Visible
    • Animation - Reset Active_Rstone's animation
    • Set Active_Rstone = No unit
    • -------- Record current stone --------
    • Set Active_Rstone = Revive_Stones[1]
    • Set Number_Rstone = 1
    • Animation - Play Active_Rstone's stand alternate animation
    • Set tempLoc = (Position of Active_Rstone)
    • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from (Position of Active_Rstone) to a radius of 300.00
    • Set Rstone_Visible = (Last created visibility modifier)
    • Custom script: call RemoveLocation(udg_tempLoc)
something like that.. I hope you know how to do the rest :D

also, someone used to tell me that using Integer A is not recommended, because of that I used [For Each Integer Variable, Do Multiple Actions] instead. Not sure why though.
 
Status
Not open for further replies.
Top