(06-15-2011, 02:37 PM)Russ Money Wrote: (06-15-2011, 02:32 PM)MrBigzy Wrote: You'd have to have a function get a constant GetPlayerSpeed, and then make it so if it's true, have MovePlayerHeadPos move left to right and keep repeating.
Yeah, I could see that working. Just need to figure out the numbers for max speed vs. walking speed.
You'd have to do do
bool weave = (GetPlayerSpeed() - abs(GetPlayerYSpeed()) > runspeed);
Otherwise his head would do stuff if you jumped / went down stairs
.
I think in this case runspeed would be about 4 ish. Just check the "player info" option in debug mode and run; one of the pieces of info it gives will be all the different movement speeds.