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

How can make that,when a unit dies his body still on the ground?

Status
Not open for further replies.
Level 8
Joined
Mar 12, 2008
Messages
437
You mean so that the corpse stays fleshy and does not become bones?
This should work, but I haven't tested it...
  • corpse creator
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Your conditions here...)
    • Actions
      • Set temp_point = (Position of (Dying unit))
      • Unit - Create a permanent Fleshy (Unit-type of (Dying unit)) corpse for (Owner of (Dying unit)) at temp_point facing (Facing of (Dying unit)) degrees
      • Unit - Remove (Dying unit) from the game
      • Custom script: call RemoveLocation( udg_temp_point )
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You shouldn't replace the unit. Just play his death animation on death, and set animation speed to 0%.

Or remove the unit's 'dissipate' animation.


PS: What you just posted was a trigger that causes the unit to be instantly replaced with a corpse when the HP reaches 0. The death animation won't be played at all, which will look like very low quality.
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
I think what you mean is the thing happen in the blizzard game "extrem candy wars".
Instead of dying you just lay there.

Create a trigger:

Event: Unit is dying
Condition: Triggering Unit = UnitYouWant
Action:
1. revive instantly at position of dying unit hide grafics
2. set life of last created unit to (value) 1.
3. play death animation for last created unit
4. pause last created unit
5. make last created unit invulnerable
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Gameplay Constants allow you to change the time the corpse lays there. I don't know if 0 (which is infinity in most World Editor fields) works, but try it. If not, you can, as Smiddle pointed out, create the corpse, but you'd have to put all the death fields to "can't raise, does not decay".
 
Status
Not open for further replies.
Top