Problem with segmented monster in Darkplaces

Discuss programming in the QuakeC language.
Post Reply
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Problem with segmented monster in Darkplaces

Post by Nahuel »

Hello Forum, i am creating a segmented monster in darkplaces using 2 md3 models (model A and model B) and gettaginfo stuff to the origin of the B model (torso) (not settatachment stuff). So i have the setmodel monster function with the A model ( legs.md3). I i get to use diferent animation for the 2 models, and i get the monster is attacking the enemy and runing simultaneously etc. But i have a problem: how can i add damage to the monster when their dependent entity (torso) is damaged? I mean when I shoot to the torso this is damaged but the monster does not notice anything. The torso (model B) is a separated entity but his "owner" is the monster (the legs, model A). I wanna to add equilibrated damage, attacker (enemy) and other relative stuff, but i can not to use the old "hit location system" because i am using weapons with tracelines and "MOVE_HITMODEL" for the tracelines. Models instead BBOXES

Code: Select all

traceline (src, src + direction*2048, MOVE_HITMODEL, self);
. thanks in advance.
hi, I am nahuel, I love quake and qc.
Seven
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: Problem with segmented monster in Darkplaces

Post by Seven »

Dear friend,

Using a monster with 2 pieces, brings Hipnotic into my mind: Armagon
Please read the source hiparma.qc (especially function: monster_armagon)
This might help you.

I think you should try this to better "link" them together:
self.trigger_field = body;
body.trigger_field = self;
or
self.trigger_field = newmis = spawn();

Maybe this helps you a little bit.

I hope you have a healthy and lucky new year 2013, Nahuel !
Seven
Post Reply