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

How do i make animated switches?

Recommended Posts

I want to make a animated switch of WOLF2's swastika turning but it's not working here's the animdefs what it says:

 switch WOLF2_SW
on sound switches/lever2 
pic WOLF2A tics 1 
pic WOLF2B tics 1 
pic WOLF2C tics 1 
pic WOLF2D tics 1
pic WOLF2E tics 1
pic WOLF2F tics 1
pic WOLF2G tics 1
pic WOLF2H tics 1
pic WOLF2I tics 1
pic WOLF2J tics 1
pic WOLF2K tics 1
pic WOLF2L tics 1
pic WOLF2M tics 1
pic WOLF2N tics 1

off sound switches/lever2 
pic WOLF2N tics 1 
pic WOLF2M tics 1 
pic WOLF2L tics 1 
pic WOLF2K tics 1
pic WOLF2J tics 1
pic WOLF2I tics 1
pic WOLF2H tics 1
pic WOLF2G tics 1
pic WOLF2F tics 1
pic WOLF2E tics 1
pic WOLF2D tics 1
pic WOLF2C tics 1
pic WOLF2B tics 1
pic WOLF2A tics 0
what am i doing wrong?

Share this post


Link to post

Did you try this for the first line:

switch doom 14 WOLF2_SW
Where "14" is the number of frames of the animation.

Also, though this only makes an aesthetical difference and doesn't cause any technical error, you probably didn't want the last tic of the second animation to have duration 0. In the example on zdoom wiki, the last tic has duration 0 only so that the second animation will have the same number of frames as the first one, but visibly display one frame less (because frames with duration 0 don't display due to immediately running out of their display time).

Share this post


Link to post
scifista42 said:

Did you try this for the first line:

switch doom 14 WOLF2_SW
Where "14" is the number of frames of the animation.


Why would you think such a stuff is even needed?

Share this post


Link to post

I'm a bit surprised the "doom" thing isn't explained on the ANIMDEFS article actually.

"doom 1" is a qualifier that the switch is expected to be found in Doom episode 1 (so it's there in shareware mode, registered mode, and commercial mode).
"doom 2" is a qualifier that the switch is expected to be found in the full version of Doom (so it's there in registered mode and commercial mode, but shareware mode shouldn't freak out if it's missing).
"doom 3" is a qualifier that the switch is expected to be found only in Doom II (so it's there in commercial mode, but shareware mode and registered mode shouldn't complain if it's missing).

This is a direct mapping to how it works in SWITCHES, which itself was a direct translation to external data of the hardcoded tables in vanilla Doom.

As a side-effect, you'll notice that every switch from Doom shareware and registered/Ultimate Doom is expected to be found in Doom II, which is why there are dummy switches in Doom II that are just copies of SW#BRCOM.

Share this post


Link to post

OK. The other things that might be wrong about the OP's switch definition are that the switch's name doesn't match either of the frame names, and/or that the same frame names are used for both the on and off animations, and/or that WOLF2* are just patches as opposed to properly defined textures.

Share this post


Link to post
Gez said:

I'm a bit surprised the "doom" thing isn't explained on the ANIMDEFS article actually.


That's because it's obsolete, deprecated and no longer even used. If that number is found it simply gets ignored. The number can be placed there for backwards compatibility but if you don't it will still work. Thus any mention of this cruft has been removed from the docs.

The whole thing should just work without any game filter specified, if not it's a bug - but I can tell you that the decompiled definitions my WADEXT tool generates still work, without any of the game filter stuff.

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
×