Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Bauul

[UDMF] Sound from a 3D Floor instead of the control sector?

Question

Posted (edited)

If you set a 3D floor to move (like as a lift), by default (G)ZDoom produces the sound of the movement from the control sector, not the target sector the player is actually on.

 

Does anyone know what methods there are for projecting the sound from the 3D floor itself, in cases where the control sector must be a long way away?

 

There's the ACS route of separately triggering an ambient sound, but I can't find any way of doing that without manually timing the lift movement and using heap of tedious trial-and-error Delay() functions to get the timing aligned.

 

Any ideas would be super appreciated!

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0
Posted (edited)
2 hours ago, Bauul said:

...

use a simple acs script...

Place a actor with the sound on the elevator then with a ACS script ....

playsound(...) make the sound loop obviously..
Then...
stopsound (...)
When the lift stops moving.
simple enough no? Alternatively you can just do thing activate and deactivate.

Share this post


Link to post
  • 0
1 minute ago, Ermi said:

When the lift stops moving

 

There's an ACS function that triggers when a sector finishes its movement? What is it?  That would make things much easiers!

Share this post


Link to post
  • 0
3 minutes ago, Bauul said:

 

There's an ACS function that triggers when a sector finishes its movement? What is it? 

I honestly dont know, i was just giving you a alternative... at least until you find the better solution. 
For the time being just set a linedef to activate a script to play thing sound on the elevator.

Share this post


Link to post
  • 0
1 hour ago, tempdecal.wad said:

 

You're the man!  This works perfectly!  Thank you so much, this is exactly what I was hoping for!

 

In case anyone comes across this in the future, the working script looks like this:

 

Script "End Lift 1" (void)
{
	PlaySound(104,"sounds/jungleliftmove",CHAN_BODY,1.0,true,ATTN_NORM,false);

	Ceiling_RaiseByValue(103,32,752);
	Floor_RaiseByValue(103,32,752);

	TagWait(103);

	StopSound(104,CHAN_BODY);
	PlaySound(104,"sounds/jungleliftstop",CHAN_BODY,1.0,false,ATTN_NORM,false);

	Delay(3*35);

	Ceiling_LowerByValue(103,32,752);
	Floor_LowerByValue(103,32,752);

	PlaySound(104,"sounds/jungleliftmove",CHAN_BODY,1.0,true,ATTN_NORM,false);

	TagWait(103);

	StopSound(104,CHAN_BODY);
	PlaySound(104,"sounds/jungleliftstop",CHAN_BODY,1.0,false,ATTN_NORM,false);
}

 

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
×