Raised This Month: $ Target: $400
 0% 

Entity & BeamFollow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 12-24-2012 , 18:18   Entity & BeamFollow
Reply With Quote #1

Hey. I made a code for entity and its beamfollow, the problem is that beamfollow dissapears after very short time (when it flyes ahead , it's "tail" dissapears. How do i make this "tail" stay and entity move ahead with trail ? Please help!
PHP Code:
 new rocket create_entity("info_target")
        if(
rocket == 0) return PLUGIN_CONTINUE
        
        entity_set_string
(rocketEV_SZ_classname"zp_jp_rocket")
        
entity_set_model(rocketROCKET_MDL)
        
        
entity_set_size(rocketFloat:{0.00.00.0}, Float:{0.00.00.0})
        
entity_set_int(rocketEV_INT_movetypeMOVETYPE_FLY)
        
entity_set_int(rocketEV_INT_solidSOLID_BBOX)
        
        new 
Float:vSrc[3]
        
entity_get_vector(playerEV_VEC_originvSrc)
        
        new 
Float:Aim[3],Float:origin[3]
        
VelocityByAim(player64Aim)
        
entity_get_vector(player,EV_VEC_origin,origin)
        
        
vSrc[0] += Aim[0]
        
vSrc[1] += Aim[1]
        
entity_set_origin(rocketvSrc)
        
        new 
Float:velocity[3], Float:angles[3]
        
VelocityByAim(playerget_pcvar_num(cvar_RocketSpeed), velocity)
        
        
entity_set_vector(rocketEV_VEC_velocityvelocity)
        
vector_to_angle(velocityangles)
        
entity_set_vector(rocketEV_VEC_anglesangles)
        
entity_set_edict(rocket,EV_ENT_owner,player)
        
entity_set_float(rocketEV_FL_takedamage1.0)
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW)
        
write_short(rocket)
        
write_short(trail)
        
write_byte(25)
        
write_byte(5)
        
write_byte(224)
        
write_byte(224)
        
write_byte(255)
        
write_byte(255)
        
message_end()
    } 

Last edited by Podarok; 12-24-2012 at 18:20.
Podarok is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 12-28-2012 , 07:19   Re: Entity & BeamFollow
Reply With Quote #2

PHP Code:
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_BEAMFOLLOW)
    
write_short()        //iEnt
    
write_short()       //szsprite
    
write_byte()       // life 0.1
    
write_byte()      // width
    
write_byte()     //r
    
write_byte()    //g
    
write_byte()   //b
    
write_byte()  //alpha
    
message_end() 
So you have to edit 'life'.

Last edited by SpeeDeeR; 12-28-2012 at 07:19.
SpeeDeeR is offline
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 13:27.


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