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

Revive Problem

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
This trigger does not revives the hero because of an unknown reason lol
I can't figure out why, the whole trigger runs normally except that little action over there

  • Special Event Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to SE_Heroes[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • Set TempInt = (Player number of (Owner of (Triggering unit)))
      • Set TempPlayerGroup = (Player group(SE_Player[TempInt]))
      • Set SE_Death[TempInt] = True
      • -------- ------------------------------------------------------------------------------------- --------
      • Game - Display to TempPlayerGroup the text: |c00FDD017Congratz!...
      • Hero - Instantly revive SE_Heroes[TempInt] at SE_Heroes_Point[TempInt], Hide revival graphics
      • Unit - Pause SE_Heroes[TempInt]
      • Camera - Pan camera for (Owner of SE_Heroes[TempInt]) to SE_Heroes_Point[TempInt] over 0.00 seconds
      • -------- ------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_SE_Heroes_Point[udg_TempInt])
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Custom script: set udg_SE_Heroes[udg_TempInt] = null
      • Custom script: set udg_SE_Player[udg_TempInt] = null
      • Custom script: set udg_SE_Heroes_Point[udg_TempInt] = null
      • -------- ------------------------------------------------------------------------------------- --------
 
Maybe this is a stupid question, but is this unit a hero? Normal units can't be revived.

Is this Pan Cam action fired? Can you display the unit's name after death? (debug only)

Check in object editor the correct setting after death.

If this fires once you lose your pointer to your unit because you null your variable: set udg_SE_Heroes[udg_TempInt] = null
 
Last edited:
Level 3
Joined
Dec 31, 2008
Messages
46
  • Special Event Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to SE_Heroes[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • Set TempInt = (Player number of (Owner of (Triggering unit)))
      • Set TempPlayerGroup = (Player group(SE_Player[TempInt]))
      • Set SE_Death[TempInt] = True
      • -------- ------------------------------------------------------------------------------------- --------
      • Game - Display to TempPlayerGroup the text: |c00FDD017Congratz!...
      • Hero - Instantly revive (Triggering unit) at SE_Heroes_Point[TempInt], Hide revival graphics
      • Unit - Pause SE_Heroes[TempInt]
      • Camera - Pan camera for (Owner of SE_Heroes[TempInt]) to SE_Heroes_Point[TempInt] over 0.00 seconds
      • -------- ------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_SE_Heroes_Point[udg_TempInt])
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Custom script: set udg_SE_Heroes[udg_TempInt] = null
      • Custom script: set udg_SE_Player[udg_TempInt] = null
      • Custom script: set udg_SE_Heroes_Point[udg_TempInt] = null
      • -------- ------------------------------------------------------------------------------------- --------

Have you tried just saying revive triggering unit?
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,993
Looks like I had this issue once, the stupidest thing is that in order to fix it, i had to create another variable "unit2" and then work with it, and it worked.
By the way:
  • Camera - Pan camera for (Owner of SE_Heroes[TempInt]) to SE_Heroes_Point[TempInt] over 0.00 seconds
->
  • Camera - Pan camera for (Player(TempInt)) to SE_Heroes_Point[TempInt] over 0.00 seconds
You set the variable TempInt to the number of the player, so why not use it?
 
Level 18
Joined
May 11, 2012
Messages
2,103
I'll try your suggestions
Wrda, you're right haha, I just missed that
It does not work omg

Edit:
  • Special Event Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to SE_Heroes[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • Set TempPoint = (Center of Return Area <gen>)
      • Set TempInt = (Player number of (Owner of (Triggering unit)))
      • Set TempPlayerGroup = (Player group(SE_Player[TempInt]))
      • Set SE_Death[TempInt] = True
      • -------- ------------------------------------------------------------------------------------- --------
      • Game - Display to TempPlayerGroup the text: |c00FDD017You faile...
      • Game - Display to TempPlayerGroup the text: |c00FDD017You will ...
      • Hero - Instantly revive SE_Heroes[TempInt] at TempPoint, Hide revival graphics
      • Unit - Pause SE_Heroes[TempInt]
      • Camera - Pan camera for (Player(TempInt)) to TempPoint over 0.00 seconds
      • Selection - Select SE_Heroes[TempInt] for (Player(TempInt))
      • -------- ------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPlayerGroup = null
      • -------- ------------------------------------------------------------------------------------- --------
Now it works, but I see the trigger runs 2 times lol
 
Last edited:
Status
Not open for further replies.
Top