LineAttack (ACS)
Jump to navigation
Jump to search
Note: This function is for ACS. For the ZScript function of the same name see LineAttack (ZScript). |
void LineAttack (int tid, fixed angle, fixed pitch, int damage [, str pufftype [, str damagetype [, fixed range [, int flags [, int pufftid]]]]]);
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:
- 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.
Examples
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 contributions are greatly appreciated. |