Room Layout & Door Rotation Problem

Firstly here is an image of my rough 4 room layout as it currently stands:


As you can just about see there are door moving in an anti clockwise direction through the building. I duplicated the original wall and door from the bottom right corner room and rotated it at a right angle to create the door for the second room etc. However this has created a problem with the open door code setup in a previous lecture. While the code asks for the door to open -60 degrees, the second door now appears to open to +30 degrees, and the 3rd and fourth doors to +120 degrees. Examples to Illustrate:
Door 1 @ -60 degrees

Door 2 @+30 degrees

Door 4 @+120 degrees

It seems to me as though the OpenDoor command is subtracting the doors current rotation to create a positive value when run, eg for Door 2: -60-(-90)=+30 and so on. I would assume that creating a separate OpenDoor for each door is excessive so perhaps there is a way I can call upon the doors current rotation value and amend the OpenDoor command based upon this?
Of course I may be way of base here due to my lack of experience so any advice or input that could point me in the right direction would be greatly appreciated. Many thanks.
EDIT 24/07/2017
Wait… I might be an idiot. So looking at the picture again it seems that all 4 doors are at the same angle if I take it as relative to the same axis? So I would need values of -60, -150 and -240 respectively to get all four doors open the same amount in the same relative direction. So I guess the question is still the same, as in can I add a rotation value relative to the doors current position?
As an afterthough as well, if I am using a different puzzle to open each door, perhaps I would need 4 separate OpenDoor.cpp files to prevent all doors opening at the same time?
EDIT 24/07/2017 16:45 Updated pic of room layout added.

Privacy & Terms