removing body parts when shot
Re: removing body parts when shot
can anyone teach me how to do this?
Re: removing body parts when shot
Make models with missing limbs, mostly this would be a death sequence.
Call the animation frames when player dies, u can be all actual about it and traceline or just
random which animation to call.
Explosive imagination of youth gets crushed by the conundrum of work...
Call the animation frames when player dies, u can be all actual about it and traceline or just
random which animation to call.
Explosive imagination of youth gets crushed by the conundrum of work...
Re: removing body parts when shot
no i meant as in can someone teach me how to use the traceline?
Re: removing body parts when shot
well, the code should be fairly self explanitory, but to me converting it to work with custom models would be hard.
Re: removing body parts when shot
the model i am using is just(well im using the base of a demon) but if i sent it to you could you show me how to calculate it or even over slkype
Re: removing body parts when shot
yeah ive got the code i just don't know how to find the trajectoryceriux wrote:well, the code should be fairly self explanitory, but to me converting it to work with custom models would be hard.
Re: removing body parts when shot
you could always find out how many uints each peace is by it's self. the quake guy is i think 32x 32y 64z (in 3dsmax) so you could take the base, find out the mesurments it's using then draw boxes around your models body parts then get the sizes of those boxes and plug them into the code?
(might work haven't tried it.)
(might work haven't tried it.)
Re: removing body parts when shot
can someone show me how to do it XD
Re: removing body parts when shot
I would like to.
But same time i want you to actualy learn something. You have been basicaly allready told what to do here. Just try your self. You will learn through errors.
And to get you start. Look at the firebullets function. There sill be a Trace_Line function. Also go read qc documentation. There will be told how quakes builtins works. Then try by drawing a image of what you try to do (i do thos with complecs things with math functions). You should have bot math knowledge from school so use it (in example getting height of the bulmets impact would be something like bullethit - monster.origin)
(btw not saying you should not ask. But we are more likely going to answer if you have allready tryed to code it and have like "what is wrong in this code? *pastecode*" than "can ylu guys plezzz show me how to do it"
But same time i want you to actualy learn something. You have been basicaly allready told what to do here. Just try your self. You will learn through errors.
And to get you start. Look at the firebullets function. There sill be a Trace_Line function. Also go read qc documentation. There will be told how quakes builtins works. Then try by drawing a image of what you try to do (i do thos with complecs things with math functions). You should have bot math knowledge from school so use it (in example getting height of the bulmets impact would be something like bullethit - monster.origin)
(btw not saying you should not ask. But we are more likely going to answer if you have allready tryed to code it and have like "what is wrong in this code? *pastecode*" than "can ylu guys plezzz show me how to do it"
-
- Posts: 336
- Joined: Thu Nov 12, 2009 4:37 am
Re: removing body parts when shot
thommoboy, I practically wrote one of them for you. The one I wrote will give you headshots, TrackAttack already sends out a traceline, all you need to do is detect where the traceline hit. "trace_endpos" is, well, the end position of the traceline where ever that may be. trace_ent is the entity that has crossed your traceline.
so lets break it down
So when it all comes together it looks like this:
so lets break it down
Code: Select all
if (trace_endpos_z... //The spot where your traceline ends, specificly the Z axis hence the _z
Code: Select all
> (trace_ent.origin_z + 18)) //Is greater than the traced entity's origin PLUS 18. Origin being the very center of the entity, 18 being about where the head is
{ //Note that 18 may NOT be accurate for your model, increase or decrease it accordingly
Code: Select all
damage = damage * 2; //TraceAttack sets the damage automatically, but we're going to multiply it by 2 for a headshot
trace_ent.headshot = TRUE; //TRUE or FALSE (1 or 0) this is the traced entity's field, this will tell the traced entity they just got hit in the head
// setmodel(trace_ent, "progs/headless.mdl"); // If you want, you can set the traced entity's model right here
}
Code: Select all
if (trace_endpos_z > (trace_ent.origin_z + 18))
{
damage = damage * 2;
trace_ent.headshot = TRUE;
// setmodel(trace_ent, "progs/headless.mdl");
}
Re: removing body parts when shot
i tried your code ghost_fang but when i shot the enemy(i tried literally everywhere) nothing changed
-
- Posts: 336
- Joined: Thu Nov 12, 2009 4:37 am
Re: removing body parts when shot
thats just the first half, you need to tell your monster what to do when you perform a headshot, when his self.headshot = TRUE;
-
- Posts: 20
- Joined: Sat Jul 10, 2010 11:20 pm
- Location: DukeLand
- Contact:
Re: removing body parts when shot
He probably just straight up copied and pasted with the setmodel line still commented out. I wouldn't be surprised whatsoever.
Re: removing body parts when shot
hahahahahaha not funny im learning you can't say you were born with a computer in your hands coding quake c can you?
Re: removing body parts when shot
ive used the change model command not the self.headshot commandGhost_Fang wrote:thats just the first half, you need to tell your monster what to do when you perform a headshot, when his self.headshot = TRUE;