State (DED)

From Doomsday Wiki
Jump to: navigation, search

Cleanup Note: This article should be cleaned up to be more readable and/or to more closely follow the Wiki article guidelines.

Attributes: Copy, Mods
Type ReferenceDED Syntax


<Copy> State
   ID = "";
   Flags = flaga | flagb | flagc;
   Sprite = "";
   Frame = 0;
   Tics = 0;
   Action = "";
   Next State = "";
   Execute = "";


The name of the state, case sensitive. Contrary to the uniformity of the original games state names, this field can actually contain any combination of letters, numbers or symbols (i.e. you can name a state "fwefe234d" if you really want to).


Added in Doomsday 1.9.0-beta6.

Name Description
fullbright Will be drawn fully bright whilst in this state.
noautolight Disable use of any automatically calculated light and halo.


Name of the sprite to be used during this state.

A sprite name consists of four letters or numbers. For instance, the sprtie name of Doom's Imp is "TROO".


The frame of the sprite to display during this state. Note that while the actual sprite frames are letter coded, here you enter a number.

If you want to use the A frame of the TROO sprite, you would enter 0 in this field. If you want to use the C frame, you would enter a 2 in this frame. Basically A=0, B=1, C=2...

Examples of frames are xxxxA1 and xxxxA2A8

The number refers to the eight rotations an object in Doom can have. 1 is front facing, 3 is left, 5 is back and 7 right.

You can also set the sprite to be full bright here by offsetting the frame number by 32768. In this case A=32768, B=32769, C=32770. But this method is deprecated as of Doomsday 1.9.0-beta6 (use Flags instead).


How long the state will last. 35 tic's equal 1 second. Any non-decimal value including -1 and 0 can be placed here. Indeed, having a series of states with 0 tic length can be useful for appearing to call multiple actions at the same time. a value of -1 is infinite.


The action to be performed when a Thing enters this state. Each game plugin defines it's own set of action routines.

Next State

What state to go to after this one has finished. An infinite number of things can use the same state and you can set up a loop of states if you wish (the original games loop their spawn and see states for instance).

If you write a state name that doesn't exist for the things next state, the thing will simply vanish when it reaches the end of the current state. It is officially recommended that if you want a thing to simply vanish after it has ran through a state or series of states that you enter "NULL" in this field.


Execute a console command every time a thing enters this state.