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 92: | Line 92: | ||
*''frame_letters'': this is one or more letters corresponding to the sprite frame index. Include more than one letter if you want a sequence of frames with the same properties (duration, flags and action). | *''frame_letters'': this is one or more letters corresponding to the sprite frame index. Include more than one letter if you want a sequence of frames with the same properties (duration, flags and action). | ||
*''tics'': the duration, in tics (1/35 seconds), of each frame. Do not use value 0 in loops. Setting value -1 will cause the thing to stop at that frame, without going forward. | *''tics'': the duration, in tics (1/35 seconds), of each frame. Do not use value 0 in loops. Setting value -1 will cause the thing to stop at that frame, without going forward. | ||
*''flags_list'': zero or more flags, separated by spaces. | *''flags_list'': zero or more flags, separated by spaces. Currently the flags are '''bright''', which causes the sprite to be full bright in any place, and '''fast''', which makes the frame take half as long on fast skill levels (used in Doom by the demons). | ||
*''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 98: | ||
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=== |