Raised This Month: $ Target: $400
 0% 

Attach sprite(model) to player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 06-08-2004 , 19:34  
Reply With Quote #8

Code:
#DEFINE UNITS 20 // How many units out it should be new origin[3], look[3], vec[3], spriteorigin[3]; new i; get_user_origin(id,origin); get_user_origin(id,origin,3); for(i = 0; i < 3; i++)     vec[i] = look[i] - origin[i]; } /* NORMALIZE vec[] HERE... I DON'T KNOW IF THERE IS A SQROOT FUNCTION OR A NORMALIZE... Normalize it by Magnitude = sqroot(x*x+y*y+z*z); vec[0] = vec[0] / Magnitude; And so on*/ for(i=0;i<3;i++) {     spriteorigin[i] = vec[i]  * UNITS; } /* SPAWN THE SPRITE HERE, OBVIOUSLY USING spriteorigin[] AS ITS ORIGIN */
No warranties
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
 



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 14:52.


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