From Eternity Wiki
Jump to: navigation, search

Deprecated: Map object specific states can now be called directly from the player gun sprites.


Allows the player's weapons to use a certain class of monster codepointers that are deemed safe.


PlayerThunk(function, facetarget, state, maketarget, useammo)


The parameters are as follows:

  • function: The function (codepointer) to call
  • facetarget: Whether to change the view angle in relation to the targeted object. Possible values:
    • 0 or noface
    • 1 or face
  • state: Frame to which the player avatar is to switch just as long as the function is called, in order to make use of any potential parameterized functions applied there.
  • maketarget: Whether to define the target of the called monster-specific attack as the object in the view sight, or the last attacker.
    • 0 or attacker: last attacker (if any) of player becomes target of PlayerThunk attack.
    • 1 or aimtarget: the object in aim sight of player becomes target.
  • useammo: Whether to consume ammo.
    • 0 or nouseammo
    • 1 or useammo



Normally map object codepointers can be called directly, but PlayerThunk allows further flexibility by controlling whether to use ammo, among other features.

For state to mean "no state change", it should be set to -1. A value of 0 means S_NULL. If set, the state change will not be visible as it will be returned to previous state instantly (usually back to the player "point the gun" frame). Its purpose is to allow the player map object to call another function described by the frame, besides the one designated in PlayerThunk. It will also use the same target based on the maketarget setting.

If useammo is set and function is valid, ammo consumption may only be canceled when maketarget is set and no object is currently in sight of player, in which case no call to the function will be made. No such check is made if maketarget is cleared and the player hasn't been attacked.

See also