AlliedModders

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

Unidentified 01-03-2006 21:40

Lightning Affect
 
How would you make a lightning affect around 'someone'(id) and the choice of colors using RGB format.

v3x 01-03-2006 21:57

To make lightning:
Code:
#define TE_BEAMPOINTS   0 new light; public plugin_precache() {     light = precache_model("sprites/lgtning.spr"); }
Code:
// new iOrigin[3]; get_user_origin(id, iOrigin); message_begin( MSG_BROADCAST,SVC_TEMPENTITY,iOrigin ); write_byte ( TE_BEAMPOINTS ); write_coord( iOrigin[0] ); write_coord( iOrigin[1] ); write_coord( iOrigin[2] - 25 ); write_coord( iOrigin[0] + random_num(75,150) ); write_coord( iOrigin[1] + random_num(75,150) ); write_coord( iOrigin[2] + 800 ); write_short( light ); write_byte ( 1 ); write_byte ( 5 ); write_byte ( 2 ); write_byte ( 20 ); write_byte ( 30 );   write_byte ( 200 ); // red write_byte ( 200 ); // green write_byte ( 200 ); // blue write_byte ( 200 ); write_byte ( 200 ); message_end();
Code:

#define        TE_BEAMPOINTS                0                // beam effect between two points
// coord coord coord (start position)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)


Unidentified 01-03-2006 23:01

Kay. But does that keep run on going? Most likely. Anyways, how would set It "off." so that It does not continue. [I know the set_task part. :P]


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

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