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

How to make new Switches

Recommended Posts

How can I make my two new textures (SW1RB and SW2RB) work like a switch when it is pressed. I don't understand what the Zdoom Reference means with the Switches lump... that onlt caused my game to crash... anyways. How can I make those two textures act like a switch.

Share this post

Link to post

The SWITCHES lump is obsolete and maintained just for Boom compatibility. For ZDoom you should define your switches in the ANIMDEFS lump.

A simple switch looks like this:

switch SW1RB on pic SW2RB tics 0
You can do even more things like assigning specific sounds and other stuff but normally you don't need it.

Share this post

Link to post

Yipes! Here's what I did in the ANIMDEFS lump

switch SW1RB on pic SW2RB tics 0 off pic SW1RB tics 0
and it didn't make a difference at all. It still does nothing. Oh and if the switch actually works... do I have to assignment the default switch sound? If I do can someone please tell me what the default switch sound is...

Share this post

Link to post

Ops well I made a silly mistake... In my ANIMDEFS I accidently put a B instead of a G in my texture name therefore messing it up.

Share this post

Link to post
The Ultimate DooMer said:

While we're on the subject of switches, is it possible to have more than one switch sound using this lump?

In ANIMDEFS you can assign each switch texture its own sound. ZDoom already uses this for Hexen's switches:

switch hexen SW_1_UP on sound Switch1 pic SW_1_DN tics 0
switch hexen SW_2_UP on sound Switch1 pic SW_2_DN tics 0
switch hexen VALVE1 on sound ValveTurn pic VALVE2 tics 0
switch hexen SW51_OFF on sound Switch2 pic SW51_ON tics 0
switch hexen SW52_OFF on sound Switch2 pic SW52_ON tics 0
switch hexen SW53_UP on sound RopePull pic SW53_DN tics 0
switch hexen PUZZLE5 on sound Switch1 pic PUZZLE9 tics 0
switch hexen PUZZLE6 on sound Switch1 pic PUZZLE10 tics 0
switch hexen PUZZLE7 on sound Switch1 pic PUZZLE11 tics 0
switch hexen PUZZLE8 on sound Switch1 pic PUZZLE12 tics 0

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