Forum

item_deadbody ?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

item_deadbody ?

Postby Baker » Wed Nov 25, 2009 6:32 pm

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?
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Downsider » Wed Nov 25, 2009 6:38 pm

Just make a new entity that sets it's frame to the dead frame and doesn't collide.
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Re: item_deadbody ?

Postby Wazat » Wed Nov 25, 2009 8:33 pm

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

Postby r00k » Thu Nov 26, 2009 5:20 pm

Hmm, this gives me an idea of a statue entity, choose the model/frame, then colormap it to gray. Make it gib-able, or transparent like a hologram ;)
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby Spirit » Thu Nov 26, 2009 6:29 pm

Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Postby Dr. Shadowborg » Fri Nov 27, 2009 1:35 am



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. :P
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1110
Joined: Sat Oct 16, 2004 3:34 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest