Raised This Month: $ Target: $400
 0% 

entity_set_vector (setting user velocity)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 10-05-2004 , 11:42   entity_set_vector (setting user velocity)
Reply With Quote #1

I'm trying to set a users velocity with this, but its not working...I'm using id passed in the damage event like so:

Code:
register_event("Damage", "hedamage_event", "b", "2!0", "4!0", "5!0", "6!0")

Code:
public damage_event(id) {

Code:
    new vector[3]     vector[0] = 0     vector[1] = 0     vector[2] = 0     entity_set_vector(id, EV_VEC_velocity, vector);
Why wouldn't that work? -- pass the ID of the player to the entity set vector function, and I'm getting a tag mismatch...?
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 10-05-2004 , 12:02  
Reply With Quote #2

Use a Float vector.

Code:
new Float:vec[3] vec[0] = 0.0
Johnny got his gun is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 10-05-2004 , 14:19  
Reply With Quote #3

hey jghg, if a read_data is a decimal, how do I convert to float?

I'm doing basically this:
Code:
new Float:upVector[3]     upVector[0] = read_data(1)     upVector[1] = read_data(2)     upVector[2] = read_data(3)     entity_set_vector(id, EV_VEC_velocity, upVector);

But tag type mismatch...=/

Also, can setting velocity raise a user off the ground?
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
BAILOPAN
Join Date: Jan 2004
Old 10-05-2004 , 14:25  
Reply With Quote #4

cast it to a float with float()
__________________
egg
BAILOPAN is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 10-05-2004 , 14:28  
Reply With Quote #5

haha, ok...I'm retarded. ;)
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
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 19:30.


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