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

[Resolved] Custom Switch, ZDoom

Recommended Posts

Hi,

I would like to add a switch into a WAD I am working on. The switch has the following textures: TGREYSW1 & TGREYSW2

I have looked at the ANIMDEFS entry on the ZDoom Wiki but still can't get the switch to toggle or play a sound. I would just like the switch to use the default switch sound rather than a new sound.

Using the example from the wiki (Link) I have changed to the following:

SWITCH TGREYSW1 on sound dsswtchn pic TGREYSW2 tics 0
SWITCH TGREYSW2 off sound dsswtchn pic TGREYSW1 tics 0
This fails to work - it doesn't toggle or play the default sound.

Can anyone help me?

Thank you,

Dave

Share this post


Link to post

If you want to use the default switch sound, you can simply omit the sound entirely. Also, do not define the same switch twice. This code is enough:

switch TGREYSW1 on pic TGREYSW2 tics 0
To explicitly tell it to use the default switch sound, you need to use the default switch sound's logical name, which is "switches/normbutn". However, since it's the default sound, there is no need to explicitly tell it to use the default, is there?

If you want to see examples, look at the animdefs file in zdoom.pk3.

Share this post


Link to post

Thanks Gez that worked nicely.
Apologies for not replying sooner - a friend bought me a copy of Skyrim so I've been obsessed by it!!

Dave

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
×