Setting another players velocity -
McCarthy - 26.01.2012
Alright, so basicly I want to make a script that would work something like this: Player A types some command, any player that is infront of him within a certain range (in this case Player B) gets his velocity set to the direction the Player A is facing, already figured out the range but I need some help with getting the Player A angle and then setting Player B's velocity to Player A's facing angle
I'd appreciate any help.
Re: Setting another players velocity -
[ABK]Antonio - 26.01.2012
pawn Код:
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
SetPlayerVelocity(Target, Angle, Angle, 0); //Hmm, maybe this? Not sure about it though
Re: Setting another players velocity -
McCarthy - 26.01.2012
If I'm not wrong that would set it to the amount of angle and not angle
Re: Setting another players velocity -
[ABK]Antonio - 26.01.2012
Quote:
Originally Posted by McCarthy
If I'm not wrong that would set it to the amount of angle and not angle
|
What...?
EDIT: I'm not sure I understand this correctly...Basically, you want to set player B's angle to player A's angle and then do something with velocity?
Re: Setting another players velocity -
McCarthy - 26.01.2012
If angle would 90 it would set velocity to 90, which is not what I want, I might have explained bad
Re: Setting another players velocity -
MP2 - 26.01.2012
You'd have to use some maths.
Re: Setting another players velocity -
McCarthy - 26.01.2012
Exactly, which I suck at so I need some help D:
Re: Setting another players velocity -
henry jiggy - 26.01.2012
You want to face player B to the direction of player A and speedboost him for him to reach player A?
Don't know how to do first part... might have to use some advanced mathies to guess what angle points to player A because all you have is both's coordinates(where they are facing doesnt matter)...
Re: Setting another players velocity -
McCarthy - 26.01.2012
Quote:
Originally Posted by henry jiggy
You want to face player B to the direction of player A and speedboost him for him to reach player A?
|
Opposite direction..in theory kinda like fus ro dah if that makes any sense
Re: Setting another players velocity -
McCarthy - 28.01.2012
Mhhm. Any ideas?