Creating decorations that can be (de)activated

From ZDoom Wiki

Jump to: navigation, search

You can also define objects that change their state when being activated or deactivated.

For this purpose, 2 base classes exist: SwitchableDecoration and SwitchingDecoration.


SwitchableDecoration allows being activated and deactivated and SwitchingDecoration can only be activated but not deactivated again.

This class defined 2 new state labels: 'active' and 'inactive'.


Note that you must include a spawn state in addition to these two special states to have the actor work properly when spawned.


You can use these to making "Talking" Actors through ACS.


An example

actor Torch : SwitchableDecoration 10242
{
  height 40
  radius 20
  +SOLID
  states
  {
  Spawn:
  Active:
    TRCH A 10
    loop
  Inactive:
    TRCH B 10
    loop
  }
}
Personal tools