Raised This Month: $32 Target: $400
 8% 

[HELP] Take prop_physics velocity and change it


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Averyinterestingname
Junior Member
Join Date: Apr 2017
Old 04-21-2017 , 08:56   [HELP] Take prop_physics velocity and change it
Reply With Quote #1

Good day! I need an example of function that would:
1)Take velocity from given prop entity
2)Change somehow
3)Send changed velocity to the entity


PHP Code:
//I tried taking vel like this and it does nothing. Couldnt find anything other
GetEntPropVector(entProp_Data"m_vecAbsVelocity"vel);

//And I tried to set velocity like this
SetEntPropVector(entProp_Data"m_vecBaseVelocity"Float:{0.0,0.0,300.0}); //doesnt work. Works only on client. 
//Yes,I know about TeleportEntity, but this is not a valid option for me. 
I would be glad if somebody could lead me to the light
Averyinterestingname is offline
Rachnus
Senior Member
Join Date: Jun 2016
Location: Funland
Old 04-21-2017 , 21:40   Re: [HELP] Take prop_physics velocity and change it
Reply With Quote #2

Quote:
Originally Posted by Averyinterestingname View Post
Good day! I need an example of function that would:
1)Take velocity from given prop entity
2)Change somehow
3)Send changed velocity to the entity


PHP Code:
//I tried taking vel like this and it does nothing. Couldnt find anything other
GetEntPropVector(entProp_Data"m_vecAbsVelocity"vel);

//And I tried to set velocity like this
SetEntPropVector(entProp_Data"m_vecBaseVelocity"Float:{0.0,0.0,300.0}); //doesnt work. Works only on client. 
//Yes,I know about TeleportEntity, but this is not a valid option for me. 
I would be glad if somebody could lead me to the light
I think TeleportEntity is the only way? I could be wrong though.
__________________
Github: https://github.com/jimppan
Steam: http://steamcommunity.com/id/jimppan
_____________________________________________ _________
Taking private requests
Rachnus is offline
Averyinterestingname
Junior Member
Join Date: Apr 2017
Old 04-22-2017 , 04:33   Re: [HELP] Take prop_physics velocity and change it
Reply With Quote #3

Quote:
Originally Posted by Rachnus View Post
I think TeleportEntity is the only way? I could be wrong though.
Thank you for your reply. I could try doing it trough TeleportEntity,but that is much worse,since It doesnt allow me to change it's velocity constantly,every frame. (I wanted to do a flying entity which will be controlled by player) However,even with TeleportEntity I need to know entity's current velocity and I still dont know how to get it.

Last edited by Averyinterestingname; 04-22-2017 at 04:34.
Averyinterestingname 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 01:40.


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