CHEATS GUIs SCRIPTS MAPS TUTORIALS SOUNDS EFFECTS TOOLS SERVERS SKINS TEXTURES MODELS PLUGINS MODS
 
Rating
Based on GVME Community!
Rating:


Your rating: N/A
Total votes: 0

You cannot rating yet!
You can rate anything - when you add rating to a submission your vote determines its success or failure.

To vote on this submission
register or login

You cannot add to Favorites!
Total Favorites

You cannot say thanks!
You must register or login

Statistics
Scores and popularity
Views: 1125
Downloads: 22
Feedback: 0

Blast Soundwave Effect From a Weapon

Share: F F F F F F F
  Added by: exeqtR
  Category: GoldSource Engine > Programming
Difficulty Level: Begginer
  Tags: Blast Soundwave Effect Weapon
You need to Precache this first with the weapon''s Precache code
CODE
m_iSpriteTexture = PRECACHE_MODEL( "sprites/shockwave.spr" );


Add this to the attack code. ex. PrimaryAttack, SecondaryAttack
CODE
MESSAGE_BEGIN( MSG_PAS, SVC_TEMPENTITY, m_pPlayer->pev->origin );
WRITE_BYTE( TE_BEAMCYLINDER );
WRITE_COORD( m_pPlayer->pev->origin.x);
WRITE_COORD( m_pPlayer->pev->origin.y);

WRITE_COORD( m_pPlayer->pev->origin.z + 5);


WRITE_COORD( m_pPlayer->pev->origin.x);
WRITE_COORD( m_pPlayer->pev->origin.y);

WRITE_COORD( m_pPlayer->pev->origin.z + 16 + ( 100 / 2 ) / .2);

WRITE_SHORT( m_iSpriteTexture );
WRITE_BYTE( 0 ); // startframe
WRITE_BYTE( 0 ); // framerate
WRITE_BYTE( 1 ); // life
WRITE_BYTE( 16 ); // width
WRITE_BYTE( 0 ); // noise

WRITE_BYTE( 255 ); //r
WRITE_BYTE( 184 ); //g
WRITE_BYTE( 51 ); //b

WRITE_BYTE( 200 ); //brightness
WRITE_BYTE( 0 ); // speed
MESSAGE_END();


Its cooler to boom out 2 sonic circles so we kind of copy the same thing over here again.
CODE
MESSAGE_BEGIN( MSG_PAS, SVC_TEMPENTITY, m_pPlayer->pev->origin );
WRITE_BYTE( TE_BEAMCYLINDER );
WRITE_COORD( m_pPlayer->pev->origin.x);
WRITE_COORD( m_pPlayer->pev->origin.y);

WRITE_COORD( m_pPlayer->pev->origin.z + 5);

WRITE_COORD( m_pPlayer->pev->origin.x);
WRITE_COORD( m_pPlayer->pev->origin.y);

WRITE_COORD( m_pPlayer->pev->origin.z + 16 + ( 100 / 2 ) / .2);

WRITE_SHORT( m_iSpriteTexture );
WRITE_BYTE( 0 ); // startframe
WRITE_BYTE( 0 ); // framerate
WRITE_BYTE( 2 ); // life
WRITE_BYTE( 16 ); // width
WRITE_BYTE( 0 ); // noise

WRITE_BYTE( 255 ); //r
WRITE_BYTE( 184 ); //g
WRITE_BYTE( 51 ); //b

WRITE_BYTE( 100 ); //alpha
WRITE_BYTE( 0 ); // speed
MESSAGE_END();
  Added: Feb 11 2021, 12:42 PM    Modified: Never edited!    Thanks List: [+]      
Add Feedback

You cannot post yet!
Get involved on GVME by posting your thoughts. Give authors your feedback to help them develop.

To post in this submission register or login
Feedback