Raised This Month: $ Target: $400
 0% 

laser guided enitity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 05-14-2006 , 04:22   laser guided enitity
Reply With Quote #1

Send a entity to a point.
Example :
Im aiming to a wall.
Code:
new origin[3] get_user_origin (id,origin,3)
This gets the point were im aiming,

now there is a entity somwhere in the map, and i want it to move ( not teleport ) it to that origin.
Somthing like a laser guided rocket.

Any suggestions?

Thanks,
Ramon
__________________
Um, hi.
Ramono is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-14-2006 , 04:31  
Reply With Quote #2

Edit:

Code:
stock entity_set_follow_origin(entity, Float:Origin[3], Float:speed) {     if(!is_valid_ent(entity)) return 0     new Float:entity_origin[3]     entity_get_vector(entity, EV_VEC_origin, entity_origin)     new Float:diff[3]     diff[0] = Origin[0] - entity_origin[0]     diff[1] = Origin[1] - entity_origin[1]     diff[2] = Origin[2] - entity_origin[2]     new Float:length = floatsqroot(floatpower(diff[0], 2.0) + floatpower(diff[1], 2.0) + floatpower(diff[2], 2.0))     new Float:Velocity[3]     Velocity[0] = diff[0] * (speed / length)     Velocity[1] = diff[1] * (speed / length)     Velocity[2] = diff[2] * (speed / length)     entity_set_vector(entity, EV_VEC_velocity, Velocity)     return 1 }

(Modified) From: The Bazooka plugin
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
nordy
Senior Member
Join Date: Apr 2006
Location: Latvia
Old 05-14-2006 , 04:34  
Reply With Quote #3

lol not the mine but laser pointer he mean
nordy is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-14-2006 , 04:43  
Reply With Quote #4

Sorry, new code.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
nordy
Senior Member
Join Date: Apr 2006
Location: Latvia
Old 05-14-2006 , 04:45  
Reply With Quote #5

oo oky
nordy is offline
nordy
Senior Member
Join Date: Apr 2006
Location: Latvia
Old 05-14-2006 , 04:45  
Reply With Quote #6

hey CHEAP SUIT maybie you can help me..?!
nordy 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 16:28.


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