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

Decay Time for Skeletons; Resurrection

Status
Not open for further replies.
Level 8
Joined
Jul 18, 2010
Messages
332
Hi, I have a spell that raises dead "specific" units. I have conditions for the specific units but now I remembered that I have set the gameplay constants for decay time to be short so when I cast the spell, it says that there are no nearby corpses nearby so I thought I could just trigger it.

These specific units, when they die, their corpses will be permanent. I was thinking of using the permanent corpse action but I'm not sure it will work.
When the units die, I'll create a corpse underneath them. When the casting unit of the resurrection casts the spell, all the corpses will be revived. But then it's just a corpse, how will I detect all the corpses that were made, are they even gonna be considered as dead units? And I also need them to be removed when this part of my map is finished.

Does anybody know a better idea? The units are skeletons by the way, I'm not sure if that's related to this problem.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Try Unit - Create permanent corpse.
I think they should be considered dead, so it's just a matter of creating the same unit-type as the dying unit. However you should remove that dying unit after its death animation has been finished so you won't have 2 corpses on top of each other.
 
Level 8
Joined
Jul 18, 2010
Messages
332
How about reviving the specific units. There are two units that can only be revived, I added neutral unit classification to them and have the spell revive only air, dead, friend, neutral, and non-ancients.

My units in the game have lots of unit classification, neutral is not one of them, for the use of one of my systems, btw.

Decay Time(sec) - Bones = 6
Decay Time(sec) - Cancellation = 6
Decay Time(sec) - Effects = 6
Decay Time(sec) - Flesh = 6
Decay Time(sec) - Fog of War Flesh= 1

Are there things here that I should change?
 
Level 8
Joined
Jul 18, 2010
Messages
332
No, thank you deathismyfriend. Bones will make the map lag if they're permanent, I just want specific units. I also found out that I changed every unit to have a death type of can't raise, doesn't decay so I found out why it isn't working at first.

That part is solved now but is there anyway to detect the suspended corpses? Cause I would want to remove them afterwards.

EDIT: I have another question, I'm not gonna make another thread, I'll just ask it here. Can buildings give experience? When I turned one of my units in to buildings, their levels disappeared. They're supposed to be level 48 and they should give off exp that a lvl 48 unit gives off.
 
Level 8
Joined
Jul 18, 2010
Messages
332
Thank you, I'll try to look in to that.

EDIT: For the corpse thing, I think I'm gonna have to use triggers, dead units are counted in groups anyway right. Does suspending corpses' decays leave them in the game, like they will never leave unless I remove them.
 
Level 8
Joined
Jul 18, 2010
Messages
332
Not sure if the suspend corpse decay is working. The corpses disappear after 6 sec which is the decay time i used in the gameplay constants. I want the corpses to appear btw.

Decay Time(sec) - Bones = 6
Decay Time(sec) - Cancellation = 6
Decay Time(sec) - Effects = 6
Decay Time(sec) - Flesh = 6

It says in the suspend corpse decay action, this only works on corpses, and only after corpses' death anim have finished.

Can someone please explain this to me cause my resurrection spell is still not working.

WHY is my resurrection spell not working?! Even if there are corpses nearby, it keeps saying no nearby corpses.

Another question:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Sarcophagus
      • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to False
    • Then - Actions
      • Set festepoint = (Position of (Dying unit))
      • Unit - Create 1 Guardian of Seth for (Owner of (Dying unit)) at festepoint facing Default building facing degrees
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at festepoint using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_festepoint)
    • Else - Actions
This trigger is not working at all. When the Sarcophagus dies, nothing happens. When the Sarcophagus dies from being killed by an enemy, nothing should happen. If it dies from expiration timer, it will create a guardian of seth.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
It says in the suspend corpse decay action, this only works on corpses, and only after corpses' death anim have finished.

Can someone please explain this to me cause my resurrection spell is still not working.

After the unit dies (A unit dies event triggers), there's is a delay before the unit begins to decay. The delay time is defined by Art - Death time in object editor.

So after the unit dies, you need to wait the decay to begin and only then suspend the decaying.

It is best to to use A unit decays event and then some delay (length depends on user preference) after that.
 
Level 8
Joined
Jul 18, 2010
Messages
332
I need to put this up again.

My RESURRECTION Spell is still not working!!

I have its targets to dead and friend but still it keeps saying that there are no nearby corpses.

Here is my suspend corpse decay trigger, it's also not working. Their corpses will disappear after 6 sec, no matter what.

  • seth decay
    • Events
      • Unit - A unit Decays
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Decaying unit)) Equal to Guardian of Seth
          • (Unit-type of (Decaying unit)) Equal to Priest of Seth
    • Actions
      • Wait 0.01 seconds
      • Unit - Suspend corpse decay for (Decaying unit)


Another problem
My death event trigger is absolutely not working and I have no idea why.
  • feste bomb death
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Sarcophagus
          • (Unit-type of (Dying unit)) Equal to Anubis Statue
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Anubis Statue
        • Then - Actions
          • Set festepoint = (Position of (Dying unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Rifleman Point Copy 9 <gen> contains (Dying unit)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Dying unit) at festepoint, Hide revival graphics
              • Unit - Move (Dying unit) instantly to riflemanpoint_Copy_9, facing 180.00 degrees
              • Hashtable - Save 30 as 5 of (Key (Dying unit)) in aoehashtable
              • Floating Text - Create floating text that reads 30 Seconds Delay!! above (Dying unit) with Z offset 50.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Rifleman Point Copy 8 <gen> contains (Dying unit)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Dying unit) at festepoint, Hide revival graphics
              • Unit - Move (Dying unit) instantly to riflemanpoint_Copy_8, facing 0.00 degrees
              • Hashtable - Save 30 as 5 of (Key (Dying unit)) in aoehashtable
              • Floating Text - Create floating text that reads 30 Seconds Delay!! above (Dying unit) with Z offset 50.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Anubis Statue <gen> contains (Dying unit)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Dying unit) at festepoint, Hide revival graphics
              • Set festepoint_Copy = (Center of Anubis Statue <gen>)
              • Unit - Move (Dying unit) instantly to festepoint_Copy, facing 90.00 degrees
              • Custom script: call RemoveLocation(udg_festepoint_Copy)
              • Hashtable - Save 30 as 5 of (Key (Dying unit)) in aoehashtable
              • Floating Text - Create floating text that reads 30 Seconds Delay!! above (Dying unit) with Z offset 50.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Anubis Statue 2 <gen> contains (Dying unit)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Dying unit) at festepoint, Hide revival graphics
              • Set festepoint_Copy = (Center of Anubis Statue 2 <gen>)
              • Unit - Move (Dying unit) instantly to festepoint_Copy, facing 90.00 degrees
              • Custom script: call RemoveLocation(udg_festepoint_Copy)
              • Hashtable - Save 30 as 5 of (Key (Dying unit)) in aoehashtable
              • Floating Text - Create floating text that reads 30 Seconds Delay!! above (Dying unit) with Z offset 50.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Rifleman Point Copy 3 <gen> contains (Dying unit)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Dying unit) at festepoint, Hide revival graphics
              • Unit - Move (Dying unit) instantly to riflemanpoint_Copy_3, facing 180.00 degrees
              • Hashtable - Save 30 as 5 of (Key (Dying unit)) in aoehashtable
              • Floating Text - Create floating text that reads 30 Seconds Delay!! above (Dying unit) with Z offset 50.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Rifleman Point Copy 2 <gen> contains (Dying unit)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Dying unit) at festepoint, Hide revival graphics
              • Unit - Move (Dying unit) instantly to riflemanpoint_Copy_2, facing 0.00 degrees
              • Hashtable - Save 30 as 5 of (Key (Dying unit)) in aoehashtable
              • Floating Text - Create floating text that reads 30 Seconds Delay!! above (Dying unit) with Z offset 50.00, using font size 8.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Else - Actions
          • Custom script: call RemoveLocation(udg_festepoint)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Sarcophagus
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
            • Then - Actions
            • Else - Actions
              • Set festepoint = (Position of (Dying unit))
              • Unit - Create 1 Guardian of Seth for Neutral Hostile at festepoint facing Default building facing degrees
              • Animation - Play (Last created unit)'s birth animation
              • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Create 1 Sarcophagus Effect for (Owner of (Dying unit)) at festepoint facing Default building facing degrees
              • Unit - Kill (Last created unit)
              • Custom script: call RemoveLocation(udg_festepoint)
        • Else - Actions

This one is a very long but I narrowed it down to these two units because they are the ones that are not working.

When the Sarcophagus dies, a guardian of seth should pop out, nothing pops out. The Sarcophagus has an expiration timer, if it is killed b4 the timer rans out, no guardian of seth will pop out.

The Anubis Statue, on the other hand, when it dies it will be revived again. It's not a hero so I think that's the problem but I'm pretty sure the reviving trigger also works on non-heroes. Correct me if I'm wrong.
 
I need to put this up again.

My RESURRECTION Spell is still not working!!

I have its targets to dead and friend but still it keeps saying that there are no nearby corpses.

Here is my suspend corpse decay trigger, it's also not working. Their corpses will disappear after 6 sec, no matter what.
Change Decaying Unit to Triggering Unit.
What is your ressurection spell based on? Some of the object editor spells have hardcoded targets.
Is the death type for those units set to "can be ressurected, does decay"? What is the "death time" for those units? Whats your gameplay constant for decaying time?

This one is a very long but I narrowed it down to these two units because they are the ones that are not working.

When the Sarcophagus dies, a guardian of seth should pop out, nothing pops out. The Sarcophagus has an expiration timer, if it is killed b4 the timer rans out, no guardian of seth will pop out.

The Anubis Statue, on the other hand, when it dies it will be revived again. It's not a hero so I think that's the problem but I'm pretty sure the reviving trigger also works on non-heroes. Correct me if I'm wrong.
You can not revive a non-hero unit with this action.
Also, there is no delay between the dying event and the revival, so I doubt it would work even with a hero unit, as the dying event fires *before* the unit actually dies.

Your sarcophagus works exactly in the opposite way you described it: the way it is now, it will create a unit when it is killed by the player, not when the expiration timer runs out.
Also, I think "Killing unit" returns a null unit when the expiration timer expires, so you should detect this case in a different way.
 
Level 8
Joined
Jul 18, 2010
Messages
332
Change Decaying Unit to Triggering Unit.
What is your ressurection spell based on? Some of the object editor spells have hardcoded targets.
Is the death type for those units set to "can be ressurected, does decay"? What is the "death time" for those units? Whats your gameplay constant for decaying time?

Will Triggering Unit work? I'll try.

My resurrection spell is based off resurrection. I remember that I've tried it b4 and it doesn't give me any problems until now.

Oh crap, I think I know now, they CAN'T be raised but can decay. Please tell me this is the solution for all of the problem. My constants for decay time are all 6 except for fog of war flesh, missiles, and structures. This is what puzzles me most. I have their decays suspended by they still disappear after 6 secs. Unless the can't be raise is the source for this problem too.

You can not revive a non-hero unit with this action.
Also, there is no delay between the dying event and the revival, so I doubt it would work even with a hero unit, as the dying event fires *before* the unit actually dies.

I've changed this to just creating a whole new unit.

Your sarcophagus works exactly in the opposite way you described it: the way it is now, it will create a unit when it is killed by the player, not when the expiration timer runs out.
Also, I think "Killing unit" returns a null unit when the expiration timer expires, so you should detect this case in a different way.

How should I do this then? I want the sarcophagus to spawn a unit when it dies from the timer but it won't if it dies from a killing unit. I've reversed this at first like this but that didn't work so I switched it to the one above and it still doesn't work.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Sarcophagus
      • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to False
    • Then - Actions
      • Set festepoint = (Position of (Dying unit))
      • Unit - Create 1 Guardian of Seth for Neutral Hostile at festepoint facing Default building facing degrees
      • Animation - Play (Last created unit)'s birth animation
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create 1 Sarcophagus Effect for (Owner of (Dying unit)) at festepoint facing Default building facing degrees
      • Unit - Kill (Last created unit)
      • Custom script: call RemoveLocation(udg_festepoint)
    • Else - Actions
 
Level 8
Joined
Jul 18, 2010
Messages
332
Oh, I didn't know that.

But how about the not suspending of the decays. Should the triggering unit instead of decaying unit fix that? Or is it the can't raise does decay that's causing it. I don't see the relationship between the two.


EDIT: I can't seem to find the lifetimer expires. Is it the Timer -Timer expires? That's not exactly what I wanted.
 
Last edited:
Can't raise types do not leave a corpse upon death. So yes, it is the cause of your problem.

Triggering unit is just better than decaying unit. Both should work in your case. However, you should always use triggering unit where it's possible, as it allows to safely use waits in your triggers.

You could check if killing unit is a null unit for the condition.
 
Status
Not open for further replies.
Top