EDF switch

From Eternity Wiki
Revision as of 14:09, 2 May 2018 by Printz (talk | contribs) (Created page with "Switches can be defined in EDF. You can also define switches with ANIMDEFS or SWITCHES, but any new Eternity features will be added in EDF as they get developed. They...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Switches can be defined in EDF. You can also define switches with ANIMDEFS or SWITCHES, but any new Eternity features will be added in EDF as they get developed.

They have the following syntax:

switch <name>
{
  on <texture>
  sound <mnemonic>
  offsound <mnemonic>
  gameindex <number>
}

Explanation of fields[edit]

The name field is the "off" texture of the switch, and is also used to identify the entry. Usually in Doom it has a name starting with SW1, like "SW1LION" in original Doom. The on field is the activated texture, starting in Doom usually with SW2, like SW2LION.

You can also give sounds to switches. The sound field, if specified, lets you set a custom sound to a switch. In addition, you can set offsound if you want an alternate sound to go from the on texture back to the name texture.

Gameindex is a compatibility setting from SWITCHES which declares if the switch is available for Doom shareware, Doom registered or Doom commercial. Not meaningful for mods, so you can ignore it.

Example[edit]

switch SW1LEVER { on SW2LEVER  sound clank  offsound lvreset }