How do you add a sound sequence to Polyobj_MoveTo?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

How do you add a sound sequence to Polyobj_MoveTo?

Post by Lexus Alyus »

Greetigns,

I'm attempting to create ROTT style moving walls using PolyObjects. My first method invovles the polyobjects moving from one mapspot to another (Polyobj_MoveToSpot) and the second method is to use map coordinates. Both work as intended, but they create no sound (I do have the sound sequences correctly defined). However just using Polyobj_Move does create the correct sound, so why is this not working for Polyobj_MoveTo and Polyobj_MoveToSpot?

Here's my MoveTo script:

Code: Select all

script 3 open
{
Polyobj_MoveTo(0, 32, 1376, 1568);
Polyobj_MoveTo(1, 32, 1440, 1568);
Polyobj_MoveTo(2, 32, 1504, 1568);
Polyobj_MoveTo(3, 32, 1568, 1568);
delay(1);
Polyobj_MoveTo(0, 32, 1376, 1824);
Polyobj_MoveTo(1, 32, 1440, 1824);
Polyobj_MoveTo(2, 32, 1504, 1824);
Polyobj_MoveTo(3, 32, 1568, 1824);
delay(1);
restart;
}
This moves 4 polyobjects from left to right, it looks great and very ROTT, but they create no sound :(

I attempted this just using Polyobj_Move, and it only works if you set the delay exactly to how long it takes for the polyobject to move from one point to the next (but it does create sound!), any delay that is less causes the polyobject to move forever in only the initial direction. Also, using this method if you walk into the polyobject it breaks and then continues to move off the map (is there any way to make polyobjects move at a constant speed even when an actor get's in to it's path?) Additionally, if I remove the reset, the polyobject refuses to move in the opposite direction unless you make the delay exactly the amount of time it takes to travel one direction. This is also a very inefficient method as the script to move 4 of these requires separate open scripts for each polyobject, so it get's quite messy and long winded.

Is this a bug or am I doing something wrong?

Ty!

:twisted:
User avatar
Kappes Buur
 
 
Posts: 4166
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: How do you add a sound sequence to Polyobj_MoveTo?

Post by Kappes Buur »

Good Heavens, long time since ....

Use, for example
SNDINFO

Code: Select all

 PolyMove        STNMV4
STNMV4 is the sound itself

and
SNDSEQ

Code: Select all

PolyOpen 

   door 1 
   play PolyMove
   nostopcutoff
   
end
:evil: --> :)
Attachments
poly-move.WAD
(48.12 KiB) Downloaded 50 times
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Re: How do you add a sound sequence to Polyobj_MoveTo?

Post by Lexus Alyus »

Yeah, it has been a while I guess :D

Thanks for the reply, but the sounds are already defined in the SNDSEQ and SNDINFO. The problem is they work when using Polyobj_Move but not when using Polyobj_MoveTo or Polyobj_MoveToSpot. How do I get them to work with the latter 2? Why do the sounds work with Polyobj_Move but not Polyobj_MoveTo or Polyobj_MoveToSpot?

Ty in adnanski

:twisted:
User avatar
Kappes Buur
 
 
Posts: 4166
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: How do you add a sound sequence to Polyobj_MoveTo?

Post by Kappes Buur »

I have been using Polyobj_Move all the while, therefore I never noticed that.

You are correct, the sound does not play for Polyobj_MoveTo and Polyobj_MoveToSpot.
Furthermore, Polyobj_MoveTo does not accept values over 255 nor negative values.

Maybe it's a bug which fell through the cracks.
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Re: How do you add a sound sequence to Polyobj_MoveTo?

Post by Lexus Alyus »

Daymne... I'll submit the bug report.

I guess this was never noticed because for most purposes Polyobj_Move works fine, but for the complex moving walls in ROTT then Polyobj_Move is too prone to bugs and polyobjects incorrectrly going through walls and vanishing out of the level for all eternity... I also notice that Polyobj_Move when used in a script that makes it move one way and then back the other doesn't work because the polyobject appears to be stuck in the initial direction, unless you set a delay that is the same or greeater than the time it takes to move the polyobject the full duration of Polyobj_Move.

Also check out this demo map I made to highlight the bug. It also features a cool section showing why Polyobj_MoveTo is far superior to Polyobj_Move

:twisted:
Attachments
LA_Polyobj-Sound_Bug.wad
Funky Polyobjects, but with no sound :(
(28.06 KiB) Downloaded 40 times
Post Reply

Return to “Mapping”