• 🏆 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!

[JASS] Non-decaying corpse, selectable

Status
Not open for further replies.
Level 4
Joined
Jul 1, 2008
Messages
46
How would I do this?

A unit dies and the unit's fleshy corpse remains, selectable, you can see what items were on the unit, etc. But the unit can't move or be attacked. But can be walked over. The unit would also have 0 hp or a ridiculous amount of HP such that it's not shown, but hide the auto-healthbar.

Any ideas, let me know, thanks.
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
You can make it also like this:

You will need:
1. Ghost (Visible)
2. Invulnerable (Neutral)
3. Spell Immunity
4. Region (in place where your units won't pass often)
- Something like this:
60400d1247474824-non-decaying-corpse-selectable-region.jpg

5. ''Life Bonus'' ability (based of ''Manual of Health'') (bonus 99999 life)
- This will ''hide'' unit health

  • Corpses
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Passive at TempPoint facing (Facing of (Triggering unit)) degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Create (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) and give it to (Last created unit)
      • Unit - Change color of (Last created unit) to (Color of (Owner of (Triggering unit)))
      • Unit - Add Ghost (Visible) to (Last created unit)
      • Unit - Add Invulnerable (Neutral) to (Last created unit)
      • Unit - Add <Spell Immunity> to (Last created unit)
      • Unit - Add Inventory>(Hero) to (Last created unit)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Hero - Create <Manual of Health> and give it to (Last created unit)
      • Animation - Play (Last created unit)'s death animation
      • Unit - Add a <Decay Time> second Generic expiration timer to (Last created unit)
      • Set TempPoint = (Center of Region 000 <gen>)
      • Unit - Hide (Triggering unit)
      • Wait 3.00 seconds
      • Unit - Move (Triggering unit) instantly to TempPoint
      • Unit - Unhide (Triggering unit)
      • Custom script: call RemoveLocation(udg_TempPoint)
Trigger works fine for me.

Don't forget to set ''Decay Time (Bones)'' to 0.01.
60399d1247474824-non-decaying-corpse-selectable-untitled.jpg
 

Attachments

  • untitled.JPG
    untitled.JPG
    51.3 KB · Views: 328
  • Region.JPG
    Region.JPG
    187 KB · Views: 794
Status
Not open for further replies.
Top