GenRefire: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
m (a bit more)
(Fixed top description not to indicate just the see state.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
GenRefire is a refire check codepointer -- similar to [[CPosRefire]] and [[SpidRefire]], it is used to let a monster go back to the ''seestate'' if the target is out of sight, dead or inexistent. Unlike those, it is customizable.
GenRefire is a refire check codepointer -- similar to [[CPosRefire]] and [[SpidRefire]], it is used to let a monster go back to another state if the target is out of sight, dead or inexistent. Unlike those, it is customizable.


===Usage===
===Usage===
Line 10: Line 10:
===Notes===
===Notes===
This codepointer includes a call to [[FaceTarget]]. Also, if the actor is '''FRIEND''' and has similar fellows in the line of fire, it will switch to ''statenum'' without checking for ''chance''.
This codepointer includes a call to [[FaceTarget]]. Also, if the actor is '''FRIEND''' and has similar fellows in the line of fire, it will switch to ''statenum'' without checking for ''chance''.
[[SpidRefire]] is equivalent to calling '''GenRefire'''(''<monster's see state>'', 10) and [[CPosRefire]] is equivalent to '''GenRefire'''(''<monster's see state>'', 40).


===See also===
===See also===

Latest revision as of 05:15, 9 September 2018

GenRefire is a refire check codepointer -- similar to CPosRefire and SpidRefire, it is used to let a monster go back to another state if the target is out of sight, dead or inexistent. Unlike those, it is customizable.

Usage[edit]

GenRefire(statenum, chance)

Parameters[edit]

  • statenum: mnemonic of frame to jump to when out of sight.
  • chance: chance out of 256 that the monster will continue firing even if out of sight.

Notes[edit]

This codepointer includes a call to FaceTarget. Also, if the actor is FRIEND and has similar fellows in the line of fire, it will switch to statenum without checking for chance.

SpidRefire is equivalent to calling GenRefire(<monster's see state>, 10) and CPosRefire is equivalent to GenRefire(<monster's see state>, 40).

See also[edit]