Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
The Ultimate DooMer

Swinging Doors

Recommended Posts

I've just started learning polyobjects today, and have created a swinging door (parting in the middle) that swings back again after a few seconds. But when I press on the door it sometimes swings inwards and sometimes swings outwards (seemingly at random).

Is there any way to force it to swing one way or the other?

(ps. anyone know what happened to the ZDoom forums?)

Share this post

Link to post

This may be a little harder said than done. Anyway, suppose you want to have two doors that you want to open inward to the next room (away from you), like this:

These doors open by using the line triggers like any normal door, but the trigger activates the right door only (Polyobject 5). The left door (Polyobject 6) is a mirror of the right door, meaning it will swing open in the other direction. The trigger I use is:

PolyObj_RotateRight(5, 5, 64);

where the first number is the tag number, the second number is the speed and the third number is how much of an angle to rotate (0 = 0°, 64 = 90°, 128 = 180°, and 192 = 270°). RotateRight means to rotate clockwise, while RotateLeft means to rotate counterclockwise.

Share this post

Link to post

I'm using Polyobj_DoorSwing (po, 8, 64, 70); at the moment (as RotateRight allows you to rotate it when it's open, sending it into the wall), is that anything to do with it?

Although having said that, I could probably run a script to make it close again afterwards if I used RotateRight/Left, so I'll try that as well.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this