CounterSwitch

From Eternity Wiki
Jump to: navigation, search

CounterSwitch(cnum, startstate, numstates)

Parameters:

  • cnum: Counter number to check. From 0 to 7.
  • startstate: name of first frame from the list.
  • numstates: number of frames from list.

This powerful codepointer implements an N-way branch where the value of the indicated counter determines to which frame the jump will occur. The frames to be jumped to must be defined in a consecutive block in EDF. The first frame in this set is deemed to be frame #0, and the last frame in the set is frame numstates - 1. The value of the counter is considered to be zero-based, so that if it is equal to zero, the object will jump to frame #0 (the frame you provided in startstate). The entire range of frames must be valid, and if it is not, no jump will occur. If the counter value is not in the range from 0 to numstates - 1, no jump will occur. Finally, if the counter number in cnum is invalid, no jump will occur. New to Eternity Engine v3.31 Delta.