Raised This Month: $ Target: $400
 0% 

Two origins, get origin of points in line


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-12-2010 , 17:00   Re: Two origins, get origin of points in line
Reply With Quote #3

Hmm... thanks, I think I got the 'trick'.

PHP Code:
    new iOrigin[3]
    new 
Float:fA[3]
    new 
Float:fB[3]

    
entity_get_vector(idEV_VEC_originfA)
    
get_user_origin(idiOrigin3)
    
IVecFVec(iOriginfB)

    new 
iNum floatround(get_distance_f(fAfB) / 50.0floatround_floor)

    
xs_vec_sub(fBfAfB)
    
xs_vec_normalize(fBfB)
    
xs_vec_mul_scalar(fB50.0fB)

    for(new 
iNumi++)
    {
        
xs_vec_add(fAfBfA)

        
/* sprite @ fA */
    

And by mistake I made a nice railgun effect

[IMG]http://img295.**************/img295/8889/dedust20057.th.jpg[/IMG]

It fades out really nicely, used TE_GLOWSPRITE and ledglow.spr
__________________

Last edited by Hunter-Digital; 07-12-2010 at 17:20.
Hunter-Digital is offline
 



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 07:09.


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