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

How to Make ANIMDEFS Switches? ZDOOM/ODamex

Recommended Posts

I am having trouble following the ZDOOM Wiki and can not figure out how to make my new switches animate from off to on and back to off again. Thus far it just remains at the initial texture.


Here is my ANIMDEFS:

warp flat FLOOR7

SWITCH ABSWTCH1
pic ABSWTCH1 tics 16
pic ABSWTCH2 tics 16

texture BLUNEON1

pic 1 tics 4
pic 2 tics 4
pic 3 tics 4
pic 4 tics 4

texture BOILER1

pic 1 tics 3
pic 2 tics 3
pic 3 tics 3

texture COMPU1

pic 1 tics 3
pic 2 tics 3
pic 3 tics 3
pic 4 tics 3
pic 5 tics 3


-------------

Share this post


Link to post

Most of your definitions look to be incomplete, you haven't defined an ON or OFF state for the switch and the textures won't work until you replace "pic <number>" with "pic <texture>". For comparison, here's some from when I was playing around with the Duke Nukem texture set.

texture DNXFAN01  // Wall fan
    pic DNXFAN01 tics 6
    pic DNXFAN02 tics 6
    pic DNXFAN03 tics 6
    pic DNXFAN04 tics 6
    
switch DNXGLS01 on sound BreakWindow  // Shootable glass
   pic DNXGLS02 tics 2
   pic DNXGLS03 tics 2
   pic DNXGLS04 tics 2
   pic DNXGLS05 tics 2
   pic DNXGLS06 tics 2
   pic DNXGLS07 tics 2
   pic DNXGLS08 tics 2

switch DNSW03OF on sound Switch1 pic DNSW03ON tics 0
switch DNSW03ON off sound Switch2 pic DNSW03OF tics 0

    // Shootable video monitors
switch DNSCRN01 on sound BreakMonitor
   pic DNSCRN17 tics 4
   pic DNSCRN18 tics 4
   pic DNSCRN19 tics 4

switch DNSCRN02 on sound BreakMonitor
   pic DNSCRN17 tics 4
   pic DNSCRN18 tics 4
   pic DNSCRN19 tics 4

switch DNSCRN03 on sound BreakMonitor
   pic DNSCRN17 tics 4
   pic DNSCRN18 tics 4
   pic DNSCRN19 tics 4

Share this post


Link to post

As per the Wiki I am using this:

switch ABSWTCH1 on sound ABSWCH pic ABSWTCH1 tics 0
switch ABSWTCH2 off sound ABSWCH pic ABSWTCH2 tics 0
switch ABSTCHA1 on sound ABSWCH pic ABSTCHA1 tics 0
switch ABSTCHA2 off sound ABSWCH pic ABSTCHA2 tics 0

Which is not working.

I also removed the bit about the sound to see if my SNDINFO was the problem but that did not appear to be what was keeping the textures from changing.

For the sake of avoiding information overload on my part, can I see an example using the Texture and SND names I am using?

Thanks in advance!

Share this post


Link to post

Your switches aren't changing texture when used - try this (changes in BOLD).

switch ABSWTCH1 on sound ABSWCH pic ABSWTCH2 tics 0
switch ABSWTCH2 off sound ABSWCH pic ABSWTCH1 tics 0
switch ABSTCHA1 on sound ABSWCH pic ABSTCHA2 tics 0
switch ABSTCHA2 off sound ABSWCH pic ABSTCHA1 tics 0

Share this post


Link to post

Well wait, the sound does not work.

What would be the correct lay out if I want to use the above named sound file in SNDINFO?

Share this post


Link to post

If "ABSWCH" is the sound lumps name, the following should work -

ABSWCH      ABSWCH
The format for SNDINFO sound assignments is <logicalname> <lumpname>, with the logical name being what's used in ANIMDEFS (or other scripts that can call sounds) and lumpname being its actual name. For comparison, here's what I used with the Duke Nukem anims listed above.
BreakGrating       GRATING
BreakVent          VENTING
BreakWindow        SHATTER
BreakMonitor       SHATTER2

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
×