Hello, I'm making a Mario mod and for now I'm experimenting in implementing various mario game play mechanics. I'm using the normal zombie as a test subject for now. What I did was to make the zombie kill the player when it touches him unless it is touched from above, in which case it's the zombie which is killed.
So far so good, but seasoned mario fans know that when mario steps on a monster he makes a small jump. I tried to do this with various methods but the player's velocity doesn't seem to change no matter what I do. A little help, please? I find my method rather crude, but I'll leave the final judgement to you. The most important thing for me is to learn why the player's velocity doesn't seem to change at all since in fact this is the same code that antlion guards use to shove the player: void CZombie::Touch( CBaseEntity *pOther ) { if ( pOther->IsPlayer() ) { if (pOther->WorldSpaceCenter().z > (this->EyePosition().z)+25.0f) { this->TakeDamage( CTakeDamageInfo( pOther, pOther, 10*(this->m_iHealth), DMG_GENERIC ) ); Vector forward, up; AngleVectors( GetLocalAngles(), &forward, NULL, &up ); pOther->ApplyAbsVelocityImpulse( forward * 10 + up * 50 ); } else pOther->TakeDamage( CTakeDamageInfo( this, this, 10*(pOther->m_iHealth), DMG_GENERIC ) ); } } On a completely unrelated note, I have to report that while experimenting I used the EndTouch function that seemed to cause a looping sound crash. I'm just saying this in case it helps track down a bug or something. Thanks in advance, Nicholas ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders