Jump: Difference between revisions
From Eternity Wiki
Jump to navigationJump to search
mNo edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
Jump(chance, state) | Jump(chance, state) | ||
'chance' is the probability out of 255 that the current frame will be set to 'state' | 'chance' is the probability out of 255 that the current frame will be set to 'state'. Note that 'state' cannot refer to global name states (ie. EDF frame mnemonics); this codepointer is strictly for use with DECORATE states. | ||
This codepointer was added in Eternity because RandomJump uses the misc1 and misc2 fields, incompatible with DECORATE. In addition, the A_Jump term is also used in ZDoom's original DECORATE implementation, making the porting of ZDoom DECORATE actors into Eternity quicker. Note that the order of arguments is reversed from RandomJump. | This codepointer was added in Eternity because RandomJump uses the misc1 and misc2 fields, incompatible with DECORATE. In addition, the A_Jump term is also used in ZDoom's original DECORATE implementation, making the porting of ZDoom DECORATE actors into Eternity quicker. Note that the order of arguments is reversed from RandomJump. | ||
[[Category:Codepointers]] | [[Category:Codepointers]] |
Latest revision as of 19:56, 3 July 2012
Jump works in the same manner as RandomJump, executing an instant switch to another frame if a randomness test passes. The usage is as follows:
Jump(chance, state)
'chance' is the probability out of 255 that the current frame will be set to 'state'. Note that 'state' cannot refer to global name states (ie. EDF frame mnemonics); this codepointer is strictly for use with DECORATE states.
This codepointer was added in Eternity because RandomJump uses the misc1 and misc2 fields, incompatible with DECORATE. In addition, the A_Jump term is also used in ZDoom's original DECORATE implementation, making the porting of ZDoom DECORATE actors into Eternity quicker. Note that the order of arguments is reversed from RandomJump.