ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mirrored Polyobjects issue (Polyobj_RotateRight/Left)

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Rejected Bugs
View previous topic :: View next topic  
Author Message
Xsnake
Dominating!


Joined: 29 Dec 2004
Location: France, Bordeaux

PostPosted: Tue Mar 12, 2013 2:43 pm    Post subject: Mirrored Polyobjects issue (Polyobj_RotateRight/Left) Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
EarthQuake
Wicked Sick!


Joined: 02 Apr 2004
Location: Athens, Ohio. Dieblieber gonna getcha!

PostPosted: Thu Apr 25, 2013 3:03 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
Xsnake
Dominating!


Joined: 29 Dec 2004
Location: France, Bordeaux

PostPosted: Mon Apr 29, 2013 5:09 pm    Post subject: Reply with quote

The mirrored thing was indeed what caused the problem. It works now. Thanks!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Rejected Bugs All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group