• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Corpse system

Status
Not open for further replies.
Hi hive!

I want to make a system, that when you kill (example) a stag, it will die, and you can loot the corpse.
(normal inventory)

Now my problems:

1. when I order the corpse to give my hero the item, the dead stag stands up (plays stand animation) rotates to my hero, and give him the item.
2. I can order the corpse to move around, but it only should lie there on the ground.

So now can I avoid, that the animal plays the stand animation, and turning to my hero?
And how can I avoid, that I can't move the animal around?
Are there triggers to prevent this? Or must I create for each unit a second, dead unit?

For helping/trying or solving this problem, you will get +rep!


Thx in advance
 
well thanks, but if I click on your link, this text appears:
Amigurumi, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

maybe post it again?
 
Level 8
Joined
Jul 28, 2008
Messages
211
I see you're working hard on the project :D
I'm not so good with systems but I can try to help. Maybe you can just create an item on the place of the corpse and order the unit to pick it up (if this doesn't make any sence and is totaly different from what you need, then I didn't quite understand what you're trying to do xD )
 
Level 5
Joined
May 3, 2009
Messages
129
make the Data -Drop items On death - false (in object editor)

then
  • test
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Hero - Drop (Item carried by (Dying unit) in slot 1) from (Dying unit)
      • Hero - Give (Last dropped item) to (Killing unit)
      • Hero - Drop (Item carried by (Dying unit) in slot 2) from (Dying unit)
      • Hero - Give (Last dropped item) to (Killing unit)
This is using unit inventory (human) Normal
 
Level 8
Joined
Apr 30, 2009
Messages
338
yes you have to make a dummy unit because any order you give to a unit that's playing the decay animation will change to another living animation.

so my suggestion is to use hashtables here and do this:

when a unit with loot dies, make a dummy unit with the same inventory
assign the dummy unit to the dying unit in a hashtable so they are linked
when the dying unit is selected, automatically select the dummy instead

this way the dying unit will stay as a corpse while keeping the illusion that you selected it, when you really selected an invisible dummy unit.
 
Status
Not open for further replies.
Top