SetActorAngle

From ZDoom Wiki

Jump to: navigation, search

void SetActorAngle (int tid, int angle)


Sets the actor's angle.

Use a value for the angle from 0.0 to 1.0.

tid: TID of thing.
angle: Angle to set.  This is a fixed point angle.

This works to set the facing of monsters, players, or any other actor.

  • North = 0.25
  • West = 0.5
  • South = 0.75
  • East = 1.0


Examples

This example makes the specified monster(s) spin like it is crazy:

script 1 (int monster)
{
	while (ThingCount(T_NONE, monster) != 0)
	{
		SetActorAngle(monster, Random(0, 65535));
		Delay(2);
	}
}
Personal tools