LineAttack

From ZDoom Wiki
Jump to: navigation, search

void LineAttack (int tid, fixed angle, fixed pitch, int damage [, str pufftype [, str damagetype [, fixed range]]]);
void LineAttack (int tid, fixed angle, fixed pitch, int damage [, str pufftype [, str damagetype [, fixed range [, int flags [, int pufftid]]]]]); (New from 2.8.1)

Usage

Fires a hitscan attack. If tid is 0, the activator of the script is the source of the attack.

Parameters

  • tid: The tid of the actor to fire the hitscan attack.
  • angle: The angle at which the attack should be fired.
  • pitch: The pitch by which the attack should be fired.
  • damage: The damage dealt by the attack.
  • pufftype: The puff to spawn. Default is "BulletPuff".
  • damagetype: The damage type of the attack. Default is "None".
  • range: The maximum distance at which the attack successfully hits. Default is 2048.0.
  • flags: The following flags can be combined by using | between the constant names: (New from 2.8.1)
    • FHF_NORANDOMPUFFZ — Disables the random z offset given to the puff when spawned.
    • FHF_NOIMPACTDECAL — Disables the generation of decals as a result of the attack.
  • pufftid: The tid to assign to the spawned puff. Default is 0, for no assignment. (New from 2.8.1)

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.