RandomJump: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
This codepointer causes the current frame to jump ''instantly'' to another frame (set by '''misc1''') if chance '''misc2'''/256 is passed. Otherwise, it will wait the normal amount of '''tics''' before going to '''nextframe'''.
This codepointer causes the current frame to jump ''instantly'' to another frame (set by '''misc1''') if chance '''misc2'''/256 is passed. Otherwise, it will wait the normal amount of '''tics''' before going to '''nextframe'''.


Note: Since the arguments are '''misc1''' and '''misc2''', they cannot be set within parentheses, but rather as separate fields (e.g.: ''action RandomJump; misc1 S_PLASMA2; misc2 128'').  
Note: Since the arguments are '''misc1''' and '''misc2''', they cannot be set within parentheses, but rather as separate fields (e.g.: ''action RandomJump; misc1 S_PLASMA2; misc2 128''). Its parameter order is also opposite to ZDoom's own A_Jump action.
 
You can use the [[Jump]] codepointer instead of this, which uses the args fields instead of misc. For Decorate availability, you need to use that instead of RandomJump.


==See also==
==See also==
Line 12: Line 14:


[[Category:Codepointers]]
[[Category:Codepointers]]
[[Category:MBF codepointers]]

Latest revision as of 06:50, 31 March 2012

Arguments:

  • misc1: frame mnemonic or frame dehacked number to jump to
  • misc2: chance out of 256 to execute the jump

This codepointer causes the current frame to jump instantly to another frame (set by misc1) if chance misc2/256 is passed. Otherwise, it will wait the normal amount of tics before going to nextframe.

Note: Since the arguments are misc1 and misc2, they cannot be set within parentheses, but rather as separate fields (e.g.: action RandomJump; misc1 S_PLASMA2; misc2 128). Its parameter order is also opposite to ZDoom's own A_Jump action.

You can use the Jump codepointer instead of this, which uses the args fields instead of misc. For Decorate availability, you need to use that instead of RandomJump.

See also[edit]