Posted: Tue Mar 12, 2013 2:43 pm Post subject: Mirrored Polyobjects issue (Polyobj_RotateRight/Left)
Hi,
I'm using PolyObjects to make doors by calling the two functions Polyobj_RotateRight and Polyobj_RotateLeft.
However, it seems once you've moved the Polyoject, you cannot move it again (even though it has actually stopped moving).
Minimal example :
http://xsnake.online.fr/wads/PolyExampleWad.wad
I'm not very familiar with the Polyojects but the example works on zdoom. If I'm doing something wrong in the example, thanks for letting me know.
Last edited by Xsnake on Mon Apr 29, 2013 5:10 pm; edited 1 time in total
I have not run into this problem with my own projects. I used the following script to open a door and then close it after a certain amount of time:
Code:
// Open the door...
If (Reversed) PolyObj_RotateRight(PolyID, DOOR_SPEED, DOOR_ANGLE);
Else PolyObj_RotateLeft (PolyID, DOOR_SPEED, DOOR_ANGLE);
...
PolyWait(PolyID); // Wait for it to open.
Delay(DOOR_DELAY); // Wait for three seconds.
// Close the door...
If (Reversed) PolyObj_RotateLeft (PolyID, DOOR_SPEED, DOOR_ANGLE);
Else PolyObj_RotateRight(PolyID, DOOR_SPEED, DOOR_ANGLE);
PolyWait(PolyID); // Wait for it to close.
It works as it should, even after updating ZDaemon the code still works. I figured it may have been because you were trying to close the door before it was fully opened, but this did not seem to be the case. Throwing a PolyWait into your script seemed to just completely pause the script which doesn't make sense, since the door is not moving.
After playing around with it a bit, I noticed that you were using mirrored polyobjects. I don't know why this matters at all, but the polyobjects stay active if they are mirrored. If you unlink them and move them separately, they work as intended, although independantly of each other (meaning if one of them is blocked, only that one will stop moving).
Just don't mirror them. It's a decent workaround, I think.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum