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

Pull player pose parameters and log to console


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
switz213
Junior Member
Join Date: Jun 2015
Old 01-24-2017 , 13:19   Pull player pose parameters and log to console
Reply With Quote #1

Is this possible? How can I grab a player's entity?

GetEntPropFloat(ent, Prop_Send, "m_flPoseParameter", 0);
or even
GetEntPropFloat(ent, Prop_Send, "m_flPoseParameter[0]");
switz213 is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-25-2017 , 15:18   Re: Pull player pose parameters and log to console
Reply With Quote #2

Quote:
Originally Posted by switz213 View Post
Is this possible? How can I grab a player's entity?

GetEntPropFloat(ent, Prop_Send, "m_flPoseParameter", 0);
or even
GetEntPropFloat(ent, Prop_Send, "m_flPoseParameter[0]");
Top one should work. That should get you the body_pitch value of whatever you're checking if it's in TF2 anyway. If you need info on values and such, I've done a bit of general fucking around with m_flPoseParameters as part of some fun work on the old GMG "Pets" plugin so I could use scaled down TF2 player models. I've not messed with it in other games though; just TF2.

I'd change "ent" to "client" though if you're trying to grab a player's poseparameter values; GetEntPropFloat(client, Prop_Send, "m_flPoseParameter", 0)

I tossed some info up on PasteBin just now about m_flPoseParameters from the work I've done. I suggest you give it a quick once-over as I explain the values you can use; http://pastebin.com/YMDDrN9n

Also, if you really want to get into animating and poseparameters and such, I was just reminded by Pelipoika of Arthurdead's "UtilsExt" extension, which I highly recommend.

EDIT: Actually, I should've asked initially, but what game are you trying to use this in? I mean, the process *should* be somewhat the same no matter the game...I think.

Last edited by 404UserNotFound; 01-25-2017 at 15:40.
404UserNotFound is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-25-2017 , 15:47   Re: Pull player pose parameters and log to console
Reply With Quote #3

The array index is the fifth param.
GetEntPropFloat(ent, Prop_Send, "m_flPoseParameter", _, 0);

Last edited by psychonic; 01-25-2017 at 15:48.
psychonic is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-25-2017 , 16:01   Re: Pull player pose parameters and log to console
Reply With Quote #4

Quote:
Originally Posted by psychonic View Post
The array index is the fifth param.
GetEntPropFloat(ent, Prop_Send, "m_flPoseParameter", _, 0);
Huh...https://sm.alliedmods.net/new-api/en...etEntPropFloat...Only 4 params for get. 5 for set.

And in the pets plugin I modified, 4 params worked just fine. Plus, why would you include a range value when you're trying to get the range value? Makes no sense.

This worked just fine and I didn't use five params in Get, I used five in Set:
PHP Code:
SetEntPropFloat(pet[iClient], Prop_Send"m_flPoseParameter", (GetEntPropFloat(iClientProp_Send"m_flPoseParameter"0) / 2), 0);
SetEntPropFloat(pet[iClient], Prop_Send"m_flPoseParameter"GetEntPropFloat(iClientProp_Send"m_flPoseParameter"1), 1); 
EDIT: Unless because m_flPoseParameter has a fifth define, we're supposed to underscore it or do what I did and not include it?

Last edited by 404UserNotFound; 01-25-2017 at 16:05.
404UserNotFound is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-25-2017 , 17:41   Re: Pull player pose parameters and log to console
Reply With Quote #5

Quote:
Originally Posted by abrandnewday View Post
Huh...https://sm.alliedmods.net/new-api/en...etEntPropFloat...Only 4 params for get. 5 for set.

And in the pets plugin I modified, 4 params worked just fine. Plus, why would you include a range value when you're trying to get the range value? Makes no sense.

This worked just fine and I didn't use five params in Get, I used five in Set:
PHP Code:
SetEntPropFloat(pet[iClient], Prop_Send"m_flPoseParameter", (GetEntPropFloat(iClientProp_Send"m_flPoseParameter"0) / 2), 0);
SetEntPropFloat(pet[iClient], Prop_Send"m_flPoseParameter"GetEntPropFloat(iClientProp_Send"m_flPoseParameter"1), 1); 
EDIT: Unless because m_flPoseParameter has a fifth define, we're supposed to underscore it or do what I did and not include it?
You're correct. I was conflating GetEntProp and GetEntPropFloat.
psychonic is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-25-2017 , 17:48   Re: Pull player pose parameters and log to console
Reply With Quote #6

Ahhh, alrighty Thought I was going crazy for a second there, I was like "I know that worked....it had to have..."

Last edited by 404UserNotFound; 01-25-2017 at 17:49.
404UserNotFound 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 22:19.


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