Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.


Postby fellowzdoomer » Thu Jun 25, 2015 9:31 am

So, you wanna learn ANIMDEFS? No problem! This tutorial will teach you the basics of ANIMDEFS, so that you can learn to, well, animate some linedefs :p

ANIMDEFS are used for a few things. They can do a technique known as "Flat Warping." In layman's terms, it basically twists and animates whatever flats are defined. Its used to make liquid all fluid and warpy.

Flat Warping can be done as so by typing the below into a text file.

Code: Select allExpand view
warp flat FWATER1
warp flat FWATER2
warp flat FWATER3
warp flat FWATER4

A nicer effect is something like this.

Code: Select allExpand view
warp2 flat FWATER1
warp2 flat FWATER2
warp2 flat FWATER3
warp2 flat FWATER4

To make a custom switch, it's a bit more difficult, but not impossible. The syntax is like this.

Code: Select allExpand view
switch *Switch_Up sprite name here*
 ON sound *Switch sound when used*
 pic *Your SWITCH_DOWN Sprite*
 tics *Enter any number. 35 tics = 1 second*
sound *Switch_Down sprite name here*
 OFF sound *activation sound when it was used*
 pic *your switch_up here.*
 tics *Enter any number. 35 tics = 1 second*

Of course, you can also animate flats and wall textures. As so.

Code: Select allExpand view
flat OrangeJ1
 pic OrangeJ1 tics 5
 pic OrangeJ2 tics 5
 pic OrangeJ3 tics 5
 pic OrangeJ4 tics 5
texture Ketchup
 pic Ketchup1 tics 5
 pic Ketchup2 tics 5
 pic Ketchup3 tics 5

This will animate the "OrangeJ" flat and the "Ketchup" wall. allowdecals will show the various decals left behind by weapons and projectiles. You can assign that to flats as well. An easier way to animate is simply this.

Code: Select allExpand view
texture OrangeJ1 range OrangeJ4 tics 5

This method usually helps to save space and make your coding file much more easier to read and neater in general. Hopefully this help you all out a little bit.
User avatar
Charmed, I'm Sure
Joined: 21 Aug 2013
Location: New Jersey
Discord: Athel#2406
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: Not Listed

Return to Tutorials

Who is online

Users browsing this forum: Yandex [Bot] and 1 guest