AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Shockwaves (https://forums.alliedmods.net/showthread.php?t=63308)

BigDontCry 11-17-2007 15:32

Shockwaves
 
Hi...

On http://www.amxmodx.org/funcwiki.php?go=func&id=262 it says; "You may generate menu, smoke, shockwaves, thunderlights, intermission and many many others messages."

And this link: http://wiki.alliedmods.net/Temp_Enti...Half-Life_1%29 doesn't show an example of how to create a shockwave effect...

Can anyone show me an example of that? Thanks

hlstriker 11-17-2007 16:10

Re: Shockwaves
 
PHP Code:

new g_shockwave;

public 
plugin_precache()
{
    
g_shockwave precache_model("sprites/shockwave.spr");
}

stock shockwave(origin[3], radiusrgb)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(21);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2]);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2] + radius);
    
write_short(g_shockwave);
    
write_byte(0); // startframe
    
write_byte(0); // framerate in 0.1's
    
write_byte(2); // life
    
write_byte(64); // width
    
write_byte(255); // noise
    
write_byte(r); // red
    
write_byte(g); // green
    
write_byte(b); // blue
    
write_byte(255); //bright
    
write_byte(0); //scrollspeed
    
message_end();



BigDontCry 11-17-2007 16:17

Re: Shockwaves
 
Thanks alot!

BigDontCry 11-17-2007 16:24

Re: Shockwaves
 
While I'm at it... Can you show some more examples that's not in the wiki?

Alka 11-17-2007 17:27

Re: Shockwaves
 
Take a look in amxmodx/scripting/include -> "message_const.inc"

Code:

#define TE_BEAMCYLINDER            21      // Cylinder that expands to max radius over lifetime
hlstriker maked a beamcylinder with a shockwave sprite :D...

hlstriker 11-17-2007 18:28

Re: Shockwaves
 
Yeah, I think I got that code from a plugin somewhere (can't remember). It creates the concussion effect like in TFC.


All times are GMT -4. The time now is 01:16.

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