Raised This Month: $ Target: $400
 0% 

How to make entity arc


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-27-2005 , 23:09   How to make entity arc
Reply With Quote #1

I need to make an entity arc from one player origin to another player origin...

as seen in the picture below..

(exuse my 1337 painting skills )

[img]
http://img292.**************/img292/130/arc6te.gif
[/img]

the code can be downloaded at the bottom...

thnx

--Zenith
Attached Files
File Type: sma Get Plugin or Get Source (coinmod.sma - 176 views - 12.3 KB)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-28-2005 , 01:12  
Reply With Quote #2

arc as in a line, like the Beam in hookmod type thing except arced. How Long Should It Last? what is the purpose for it in your script?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-28-2005 , 02:44  
Reply With Quote #3

i think since its coin mod that he is going to try and get someone to drop coins in an arch fashion
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-28-2005 , 02:55  
Reply With Quote #4

ah, i get it...
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-28-2005 , 12:25  
Reply With Quote #5

nobody knows how
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-28-2005 , 13:07  
Reply With Quote #6

yeah, ppl do, its not too hard, set_user_velocity(entity,vector) this is not hard to do. Just find the difference in the 2 locations of the player and the end of the arc then set the velo to that and add some on the Z side so that it goees up and arcs and it will fly.

module: engine
Funcwiki

Contact me for additional help, +karma
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-28-2005 , 13:20  
Reply With Quote #7

Thnx chronic..i will give you karma as soon as it lets me....

but..i dont get what to do for the vectors part


( p.s. i cant contact you unless my mom is gone...she will get mad and think your a hacker or something :/, i still have you on AIM though... )
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-28-2005 , 13:33  
Reply With Quote #8

ok, look, im gonna give u an example of what u want to do.

You have a player at point A which is 0 0 0

You have a coin at point B which is 100 200 0

if you want the coin to fly to the person:

Code:
new Float:vector[3]
vector[0] = -100.0
vector[1] = -200.0
vector[2] = 80.0

set_user_velocity(coin,vector)
Now to calculate the vector, just do this.

Code:
new Float:origin[3]
entity_get_vector(id,EV_VEC_origin,origin)
new Float:coinorigin[3]
entity_get_vector(coin,EV_VEC_origin,coinorigin)

new Float:vector[3]
vector[0] = origin[0] - coinorigin[0]
vector[1] = origin[1] - coinorigin[1]
vector[2] = origin[2] - coinorigin[2] + 80

set_user_velocity(coin,vector)
Adding 80 may make the coin fly over the person so a little, so you may have to mess around w/ the x and y vector by subtracting like 10 from each or something.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-28-2005 , 14:22  
Reply With Quote #9

thnx man...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 14:27.


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