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

[Spell] respawn bug

Status
Not open for further replies.
Level 3
Joined
Jul 26, 2013
Messages
41
  • Arachnathid Group
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Add Barbed Arachnathid 0101 <gen> to group_Arachnathids
      • Unit Group - Add Barbed Arachnathid 0100 <gen> to group_Arachnathids
      • Unit Group - Add Barbed Arachnathid 0099 <gen> to group_Arachnathids
      • Unit Group - Add Crystal Arachnathid 0098 <gen> to group_Arachnathids
      • Unit Group - Add Crystal Arachnathid 0097 <gen> to group_Arachnathids
      • Unit Group - Add Crystal Arachnathid 0081 <gen> to group_Arachnathids
      • Unit Group - Add Crystal Arachnathid 0079 <gen> to group_Arachnathids
      • Unit Group - Add Warrior Arachnathid 0102 <gen> to group_Arachnathids
      • Unit Group - Add Warrior Arachnathid 0103 <gen> to group_Arachnathids
      • Unit Group - Add Arachnathid Earth-borer 0104 <gen> to group_Arachnathids
  • Arachnathid Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in group_Arachnathids) Equal to True
    • Actions
      • Wait (Random real number between 60.00 and 120.00) seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at (Random point in arachnathids <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to group_Arachnathids
SO.. I have those 2 triggers but it doesn't seem to respawn them anymore... if I set the respawn time to 15-30 instead of 60-120 it works.. why doesn't it work with a longer respawn time as well?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
If the corpse disappears, then there's no body to rise, hence rise dead, animate dead and any other type of spells which require dead unit will not work.

However you could save the unit-type of dying unit and then when the timer is up, you create the unit-type you saved. It would be a bit more complicated though.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You're a genius! It worked... now the problem is that I can't Raise Dead on those creatures I want to respawn?
What made the units unable to be affected by Raise Dead by following that simple trigger ?

I can't really follow the logic of this statement.
When did you actually cast the Raise Dead ?
If you cast it when the corpse has successfully gone a decay state, then it IS possible that you won't be able to cast it since the corpse is no longer exist.
 
Level 3
Joined
Jul 26, 2013
Messages
41
What made the units unable to be affected by Raise Dead by following that simple trigger ?

I can't really follow the logic of this statement.
When did you actually cast the Raise Dead ?
If you cast it when the corpse has successfully gone a decay state, then it IS possible that you won't be able to cast it since the corpse is no longer exist.


You understood that wrong. I was saying that if I Raise Dead on the units I want to respawn via trigger, it will bug my trigger because there won't be a corpse available anymore to respawn it from.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Try this trigger.
Also, you leak a location there, just follow this trigger and it should work fine.

  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Custom script: local integer UnitType = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local player Players = GetTriggerPlayer()
      • Wait X seconds
      • Set TempLoc = (Random point in Region 000 <gen>)
      • Custom script: set udg_TempUnit = CreateUnit(Players, UnitType, GetLocationX(udg_TempLoc), GetLocationY(udg_TempLoc), 0)
      • Unit Group - Add TempUnit to group_Arachnathids
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: set Players = null
Units created via CreateUnit function will not have its unit be referred as (Last created unit).
That is why I assign the TempUnit directly to that CreateUnit function, for easier manipulating via GUI trigger using TempUnit acting as (Last created unit).

The trigger above is just a minor modification for the original ones - I just saved the Unit Type of the dead unit and be used later on while reviving.

Therefore, even though the corpse is not there any longer, but it can still respawn the same unit type because I had already saved it.
 
Status
Not open for further replies.
Top