item_deadbody ?
Moderator: InsideQC Admins
6 posts
• Page 1 of 1
item_deadbody ?
First, having a corpse or 2 sitting around on a map, how would label the entity?
item_deadbody implies you can pick it up
monster_deadbody implies it is a monster
What should it be called?
Anyways, how would one go about writing QuakeC to have a dead body or 2 laying around in an area where the map has it as an entity?
item_deadbody implies you can pick it up
monster_deadbody implies it is a monster
What should it be called?
Anyways, how would one go about writing QuakeC to have a dead body or 2 laying around in an area where the map has it as an entity?
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: item_deadbody ?
Baker wrote:First, having a corpse or 2 sitting around on a map, how would label the entity?
item_deadbody implies you can pick it up
monster_deadbody implies it is a monster
What should it be called?
Anyways, how would one go about writing QuakeC to have a dead body or 2 laying around in an area where the map has it as an entity?
func_corpse
corpse
dead_body
deadbody
detail_player_body
Whatever works.
To do this, just have a function in your code with the same name as the entity you place in your map. Have it set its model to the players' model, and the frame to one of the "I'm lying down dead not hurting anyone" frame. Alternately, you can let the mapper set the frame for you, which puts more power in their fingers.
Set solid to SOLID_NOT, and probably set movetype to MOVETYPE_TOSS so the corpse moves with platforms etc. You can also set its size in this case so that it will sit on the floor at the right height.
You could actually take it to an extreme and make a super-generic entity that will accept any model from the mapper, and even let him set options to give the model an animation (in case the model doesn't already have a frame group for that). That's what I did in my voidents mod. If all you want is player bodies though, it's much easier to just do the simple way.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
Mandatory lecture: http://www.celephais.net/board/view_thread.php?id=37116
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
- Spirit
- Posts: 1031
- Joined: Sat Nov 20, 2004 9:00 pm
Spirit wrote:Mandatory lecture: http://www.celephais.net/board/view_thread.php?id=37116
That's a cool thread there.
That said, me being a lazy bastard and not wanting to spend like 2-3 minutes per corpse entity made a misc_pcorpse entity in player.qc, set it up so that it used self.weapon and the resident framemacros, then slapped it into a quake.fgd with pulldown menu for each lying dead frame.
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
