Polyobj DoorSwing

From Eternity Wiki
Jump to: navigation, search

7:351:Polyobj_DoorSwing(id, speed, rotation, delay)

  • id: polyobject to swing as a door
  • speed: angular speed to move it
  • rotation: how much to rotate it, in byte angle
  • delay: time in tics for the door to return to its closed state

Rotates the polyobject as a door, acting similar to Door_Raise for sectors. The door cannot be retriggered to close, however, and there's no option to keep it open permanently here (for that, use Polyobj_RotateLeft or Polyobj_RotateRight).

By default the polyobject door rotates counterclockwise (left). To rotate right, make speed negative. Alternatively, if it's a double door (two rotating polyobjects), you can use a mirrored polyobject from Polyobj_StartLine as a slave for the master polyobject that rotates left.