Editing DECORATE state syntax
From Eternity Wiki
Jump to navigationJump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 19: | Line 19: | ||
<tics> := [0-9]+ | <tics> := [0-9]+ | ||
<flagslist> := <flag><flagslist> | <flagslist> := <flag><flagslist> | ||
<flag> := "bright" | "fast" | "offset" '(' <x> ',' <y> | <flag> := "bright" | "fast" | "offset" '(' <x> ',' <y> ')' | nil | ||
<action> := <name> | <action> := <name> | ||
| <name> '(' <arglist> ')' | | <name> '(' <arglist> ')' | ||
Line 95: | Line 95: | ||
**'''bright''': causes the sprite to be full bright in any place; | **'''bright''': causes the sprite to be full bright in any place; | ||
**'''fast''': makes the frame take half as long on fast skill levels (used in Doom by the demons); | **'''fast''': makes the frame take half as long on fast skill levels (used in Doom by the demons); | ||
**'''offset'''(''x'', ''y'' | **'''offset'''(''x'', ''y''): useful for weapon HUD sprites, causes the image to be offset by the exact amount of ''x'' and ''y'' from the center-bottom, overriding the current bob amount. Under Doom, ''x'' must be nonzero for both offsets to have effect; under other games, each of them needs to be nonzero for each of them to have effect. You can override the setting in [[gameproperties]]. | ||
*''action'': this can be a [[List of codepointers|codepointer]], optionally followed by a list of arguments enclosed by parentheses. Make sure to include strings in double quotes (""). Conventionally, from ZDoom, and based on the Doom source code in general, codepointers are prefixed with '''A_''', but it is not required here. | *''action'': this can be a [[List of codepointers|codepointer]], optionally followed by a list of arguments enclosed by parentheses. Make sure to include strings in double quotes (""). Conventionally, from ZDoom, and based on the Doom source code in general, codepointers are prefixed with '''A_''', but it is not required here. | ||
Line 102: | Line 101: | ||
Some codepointers, such as [[CounterJump]], [[Jump]] and so on let the calling thing jump to specific frames. For the frame name parameter, just use the label name. | Some codepointers, such as [[CounterJump]], [[Jump]] and so on let the calling thing jump to specific frames. For the frame name parameter, just use the label name. | ||
The MBF-based [[RandomJump]] uses the '''misc1''' and '''misc2''' frame fields as parameters. Since the DECORATE style syntax currently | The MBF-based [[RandomJump]] uses the '''misc1''' and '''misc2''' frame fields as parameters. Since the DECORATE style syntax currently doesn't support '''misc1''' and '''misc2''', you have to use [[Jump]], which uses args, is based on ZDoom's implementation and only works for DECORATE state syntax. Other codepointers, such as [[CounterJump]], work both for non-DECORATE and DECORATE syntax. Certain codepointers such as [[CounterSwitch]] aren't designed for DECORATE state syntax however. | ||
===Keywords=== | ===Keywords=== |