Raised This Month: $ Target: $400
 0% 

Gunshot smoke ( wall puff )


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bos93
Veteran Member
Join Date: Jul 2010
Old 09-29-2012 , 13:41   Gunshot smoke ( wall puff )
Reply With Quote #1

who can help me with recreating wall puff effect like in CS? I tried with SVC TEMPENTITY, but it looks bad
__________________

Last edited by Bos93; 09-29-2012 at 13:42.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-29-2012 , 14:16   Re: Gunshot smoke ( wall puff )
Reply With Quote #2

Find the right sprite.
__________________
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 09-29-2012 , 14:25   Re: Gunshot smoke ( wall puff )
Reply With Quote #3

I am using default sprites, but the problem is that sprite stucks in the wall, and its not became any larger

PHP Code:
public TraceAttack_PostpEntityiAttackerFloat:flDamageFloat:fDir[3], ptriDamageType)
{
    
    new 
iDecal GUNSHOT_DECALSrandom_numsizeofGUNSHOT_DECALS ) - ) ];
    

    new 
Float:vecEnd[3], Float:vecPlane[3]
    
    
get_tr2(ptrTR_vecEndPosvecEnd);
    
get_tr2(ptrTR_vecPlaneNormalvecPlane);

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_GUNSHOTDECAL)
    
write_coord_f(vecEnd[0])
    
write_coord_f(vecEnd[1])
    
write_coord_f(vecEnd[2])
    
write_short(pEntity)
    
write_byte(iDecal)
    
message_end()


    
pEntity engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"env_sprite"))
    
    
entity_set_origin(pEntityvecEnd)

    
entity_set_model(pEntityWEAPON_TRACE_EFFECT)

    
entity_set_int(pEntityEV_INT_solidSOLID_NOT)
    
entity_set_int(pEntityEV_INT_movetypeMOVETYPE_NOCLIP)
    
    
entity_set_float(pEntityEV_FL_animtimeget_gametime())
    
entity_set_float(pEntityEV_FL_framerate40.0)    
    
set_pev(pEntitypev_scale0.5


    
set_pev(pEntitypev_spawnflagsSF_SPRITE_ONCE)


    
// Set velocity
    
new Float:vecVelocity[3], Float:vecRight[3], Float:vecUp[3];

    
engfunc(EngFunc_VecToAnglesvecPlanevecPlane );

    
vector_to_angle(vecPlanevecPlane);

    
angle_vector(vecPlane,ANGLEVECTOR_RIGHT,vecRight)
    
angle_vector(vecPlane,ANGLEVECTOR_UP,vecUp)

    
vecVelocity[0] *= 32.0;
    
vecVelocity[1] *= 32.0;
    
vecVelocity[2] *= 32.0;
    
    new 
Float:flRandomVec random_float(0.064.0) * random_float(-1.01.0);
    
    
vecRight[0] *= flRandomVec;
    
vecRight[1] *= flRandomVec;
    
vecRight[2] *= flRandomVec;
    
    
flRandomVec random_float(0.064.0) * random_float(-1.01.0);
    
    
vecUp[0] *= flRandomVec;
    
vecUp[1] *= flRandomVec;
    
vecUp[2] *= flRandomVec;
    
    
vecVelocity[0] += vecRight[0] + vecUp[0];
    
vecVelocity[1] += vecRight[1] + vecUp[1];
    
vecVelocity[2] += vecRight[2] + vecUp[2];

    
set_pev(pEntitypev_velocityvecVelocity);

    
DispatchSpawn(pEntity);

    
entity_set_int(pEntityEV_INT_movetypeMOVETYPE_NOCLIP)

    
set_pev(pEntitypev_rendermode,  kRenderTransAdd)

    
set_pev(pEntitypev_renderamt,   27.0)

    
entity_set_float(pEntityEV_FL_animtimeget_gametime())
    
    
entity_set_float(pEntityEV_FL_nextthinkget_gametime() + 0.025);

    return 
HAM_IGNORED;

__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 11-12-2012 , 08:25   Re: Gunshot smoke ( wall puff )
Reply With Quote #4

And the solution was http://pastebin.com/rcquQuiN
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:20.


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