WeaponCtrJump

From Eternity Wiki
Revision as of 16:57, 8 May 2011 by Printz (talk | contribs) (templatized)
Jump to navigationJump to search

Description

This codepointer compares one of the counters with a value or another counter, and jumps instantly to frame statenum if the condition is met.

Usage

WeaponCtrJump(statenum, checktype, value, cnum, psprnum)

Parameters

  • statenum: name or Dehacked number of frame to jump to.
  • checktype: what type of comparison to apply, depending on the number or mnemonic used.
Numbers 0-6 are used to compare a counter value with a constant
0 less
1 lessorequal
2 greater
3 greaterorequal
4 equal
5 notequal
6 and (bitwise operation): if result is nonzero, condition is passed.
Numbers 7-13 are used to compare a counter value with another counter's value:
7 less_counter
8 lessorequal_counter
9 greater_counter
10 greaterorequal_counter
11 equal_counter
12 notequal_counter
13 and_counter.
  • value: constant value or counter number (0-2) to compare against (right operand).
  • cnum: counter number (0-2) to compare (left operand).
  • psprnum: what gun sprite type this function affects:
0 weapon: affect main weapon sprite
1 flash: affect muzzle flash sprite (which appears overlapping the main weapon sprite).

Examples

No examples given.

Notes

This codepointer is used for frame scripting within a player weapons' frames. It's not designed to affect non-player game world objects or the player avatar. It's used on the frames of guns that typically appear in front of the game screen.

In Eternity each player weapon has three counters that can be edited and conditionally checked by codepointers to achieve scripted effects.

Otherwise, it will work normally and jump to next frame after frame's tics duration. This can be used for any of two weapon sprite types: normal gun, or muzzle flash.

See also