SetActorFacingAngle

SetActorFacingAngle

Description:
Function SetActorFacingAngle set the facing angle of an actor.
Function SetActorFacingAngle was added in 0.3.7 and will not work in earlier versions!
  • When you set angle exceeding 360.0 degrees, actor will always face north (angle 0.0).
  • When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later.
Players will see actor's facing angle changed only when it is restreamed to them (fixed in client 0.3.7 R2).


Parameters:
(actorid, Float:ang)
int actorid The ID of the actor to set the facing angle of. Returned by CreateActor.
float ang The facing angle to set for the actor.


Return Values:
  • 1: The function was executed successfully.
  • 0: The function failed to execute. The actor specified does not exist.


Examples:
new MyActor;
 
public OnGameModeInit()
{
    MyActor = CreateActor(...);
    return 1;
}
 
// Somewhere else
SetActorFacingAngle(MyActor, 180.0);


Related Functions
The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.