Skip to content

GAMEEVENT_CHECKIFSTRUCKPLAYER EVENT script type

This adds a new ACS EVENT script type: GAMEEVENT_CHECKIFSTRUCKPLAYER, which triggers after a player performs some kind of attack. Strictly speaking, when PLAYER_CheckStruckPlayer is called in the source code. The activator is the attacking player, arg1 is the struck type:

  • STRUCKTYPE_HITSCAN: a normal hitscan attack.
  • STRUCKTYPE_RAIL: a rail attack.
  • STRUCKTYPE_EXPLOSION: an explosion (e.g. from a projectile).

arg2 is the number of enemy players that were struck by the attack. If this argument is zero, then no enemy players were hit.

For the sake of performance, this event is disabled by default and must be enabled in MAPINFO by enabling the EnableStruckPlayerEventScripts property in a GameInfo block. While this event type seems niche, it mostly serves as a prerequisite to !118 (merged) so that it's possible to remake the "Accuracy", "Precision", "Impressive", and "Most Impressive" medals in ACS.

Merge request reports

Loading