PDA

View Full Version : makeing laser fire pass through like jedidodge


Markaine
03-31-2003, 09:22 AM
I'm trying to add a command that makes only the upper part of your body nonsolid so that laser fire passes through you. I've tried all sorts of things.

This is how its supposed to work:

If I press "x" the torso, arms, and head are ignored by a shot, but only until the animation ends.

This is what I have so far:

else if (Q_stricmp(cmd, "evade") == 0)
{

knownCmd = qtrue;

{

if (Q_irand(0,2))

{
StandardSetBodyAnim(ent, BOTH_DODGE_L, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FL AG_HOLDLESS);
}
else
{
StandardSetBodyAnim(ent, BOTH_DODGE_R, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FL AG_HOLDLESS);
}
ent->client->ps.powerups[PW_SPEEDBURST] = level.time + 100;
(a million failed attempts at coding it right...)

Is that passthrough code what I need to study more?
Or should I add some stuff to combat.c? Then again it might mess with the jedidodgeevasion stuff.

Markaine
03-31-2003, 09:54 AM
Also I need to make feet do damage. Like If a player lands on someone's head, or my double kick animation BOTH_DEATHBACKWARDS1.

Is it possible to add a damaging flag or something to a glm?
Or should I try something in combat.c or active.c about r_ and l_foot?

razorace
03-31-2003, 01:11 PM
Just curious, what are these changes for?

Making something solid or not is a entity wide change. IE it's all or nothing.

I instead made the bolt respawn at the point of impact with ignore set to the impactee.

razorace
03-31-2003, 01:21 PM
Originally posted by Markaine
Also I need to make feet do damage. Like If a player lands on someone's head, or my double kick animation BOTH_DEATHBACKWARDS1.

Is it possible to add a damaging flag or something to a glm?
Or should I try something in combat.c or active.c about r_ and l_foot?

I'd guess that the best way to do it would be to do some damage tracing down the attacking leg while that animation is running with some code in WP_SaberPositionUpdate.