AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Changing beam origin (https://forums.alliedmods.net/showthread.php?t=128254)

drekes 05-30-2010 11:54

Changing beam origin
 
Hi

I made an entity and several TE_BEAMPOINT messages, and i was wondering how i can change the origins of the beams every second. Or delete 1 and make a new one on a random origin. I use this to make them:
PHP Code:

    beamorigin(Entrandom_num(-64006400), random_num(-64006400), random_num(-64006400), BeamSpr1.015.050.0random_num(1.010.0), 5.0random_num(1255), random_num(1255), random_num(1255), 20050)


stock beamorigin(entorigin1origin2origin3spritestartframefpslifewidthampredgreenbluebrightscroll)
{
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    
write_byte(TE_BEAMENTPOINT)
    
write_short(ent
    
write_coord(origin1)
    
write_coord(origin2)
    
write_coord(origin3)
    
write_short(sprite
    
write_byte(startframe
    
write_byte(fps
    
write_byte(life
    
write_byte(width
    
write_byte(amp)     
    
write_byte(red)
    
write_byte(green)
    
write_byte(blue)
    
write_byte(bright)
    
write_byte(scroll)
    
message_end()



Brreaker 05-30-2010 12:55

Re: Changing beam origin
 
set_task maybe?and every task you get some ++ at that coords ?

drekes 05-30-2010 13:05

Re: Changing beam origin
 
i thought about that to, but then i need a way to kill only one beam, otherwise they'll keep coming.


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

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