Quantcast
Channel: ZDoom
Viewing all articles
Browse latest Browse all 3391

Scripting • Adding a custom switch texture

$
0
0
Hi,

I am trying to add a custom switch texture and I am at a loss.
in my PK3, I have an "ANIMDEFS" with the following code:

Code:

switch SWoffBark on sound WoodSwitch pic SWonBark tics 0switch SWonBark off sound WoodSwitch pic SWoffBark tics 0
The code is basically copied from the "Simple toggle switch" example from https://zdoom.org/wiki/ANIMDEFS#Switches.

I tried to make a switch in my UDMF map, but the texture does not react to being used. The texture does not change and no sound is played.
Trouble shooting I did:
1: Animated textures from the ANIMDEFS file work in the map, so the ANIMDEFS file is read and works.
2: Exchanging my custom switch texture with a build in switch plays a sound and changes the texture.
3: I used both my custom sound and "Door1" from the example code. The sound is not played, making me think it is the definition that is not working.

I assume, I am missing something, but I am stumped as to what it is.

Statistics: Posted by TheSartremaster — Mon Jun 17, 2024 12:58 pm



Viewing all articles
Browse latest Browse all 3391

Trending Articles