Hey I am trying to create a sprite between a player and where the player is aiming. As it is now, it creates a sprite all the way across the map, so I want to limit the distance the sprite can be created.
What I have now is
Code:
new pOrigin[3],tOrigin[3]
get_user_origin(id,pOrigin)
get_user_origin(id,tOrigin,3)
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(TE_BEAMPOINTS)
write_coord(pOrigin[0])
write_coord(pOrigin[1])
write_coord(pOrigin[2])
write_coord(tOrigin[0])
write_coord(tOrigin[1])
write_coord(tOrigin[2])
What I think I need is some kind of function that will follow angles that you pass it for a distance you pass it and return a origin or vector or something. Is there any such function or any ideas for how to create one?