AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Concussion Effect (not the knockback kind) (https://forums.alliedmods.net/showthread.php?t=12232)

KCE 04-08-2005 22:38

Concussion Effect (not the knockback kind)
 
Does anyone know how to do a concussion effect? I don't mean the knockback kind but the one that makes it seem like you're dizzy. There used to be a message for it but I think it's gone.

XxAvalanchexX 04-09-2005 12:05

From the HLSDK:

Code:

// Knock the screen around a little bit, temporary effect
pmove->punchangle[ 2 ] = pmove->flFallVelocity * 0.013;        // punch z axis

So I'm assuming you're going to want to play around with EV_VEC_punchangle.

KCE 04-09-2005 14:49

What file did you find it in?

XxAvalanchexX 04-09-2005 15:46

I opened up the "mp" project and searched for "knock", and got only one result: Line 2737 in pm_shared.c. Here's the entire section of code that has it:

Code:
void PM_CheckFalling( void ) {     if ( pmove->onground != -1 &&          !pmove->dead &&          pmove->flFallVelocity >= PLAYER_FALL_PUNCH_THRESHHOLD )     {         float fvol = 0.5;         if ( pmove->waterlevel > 0 )         {         }         else if ( pmove->flFallVelocity > PLAYER_MAX_SAFE_FALL_SPEED )         {             // NOTE:  In the original game dll , there were no breaks after these cases, causing the first one to             // cascade into the second             //switch ( RandomLong(0,1) )             //{             //case 0:                 //pmove->PM_PlaySound( CHAN_VOICE, "player/pl_fallpain2.wav", 1, ATTN_NORM, 0, PITCH_NORM );                 //break;             //case 1:                 pmove->PM_PlaySound( CHAN_VOICE, "player/pl_fallpain3.wav", 1, ATTN_NORM, 0, PITCH_NORM );             //  break;             //}             fvol = 1.0;         }         else if ( pmove->flFallVelocity > PLAYER_MAX_SAFE_FALL_SPEED / 2 )         {             qboolean tfc = false;             tfc = atoi( pmove->PM_Info_ValueForKey( pmove->physinfo, "tfc" ) ) == 1 ? true : false;             if ( tfc )             {                 pmove->PM_PlaySound( CHAN_VOICE, "player/pl_fallpain3.wav", 1, ATTN_NORM, 0, PITCH_NORM );             }             fvol = 0.85;         }         else if ( pmove->flFallVelocity < PLAYER_MIN_BOUNCE_SPEED )         {             fvol = 0;         }         if ( fvol > 0.0 )         {             // Play landing step right away             pmove->flTimeStepSound = 0;                         PM_UpdateStepSound();                         // play step sound for current texture             PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), fvol );             // Knock the screen around a little bit, temporary effect             pmove->punchangle[ 2 ] = pmove->flFallVelocity * 0.013; // punch z axis             if ( pmove->punchangle[ 0 ] > 8 )             {                 pmove->punchangle[ 0 ] = 8;             }         }     }     if ( pmove->onground != -1 )     {               pmove->flFallVelocity = 0;     } }


All times are GMT -4. The time now is 09:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.