HitscanEffect ​
Inherits: CompositeEffect < Effect < DatabaseResource < Resource
An instant shot: a line from the muzzle of the originator towards the target (an entity, or the point the user aims at) as far as max_range, and the child effects are applied to the first entity it meets (or to several, with pierce_count). No flight time, nothing to dodge, no projectile that can miss a thin target: for guns and beams. Bows and thrown things are projectile effects. See docs/systems/ability-mechanics-plan.md, section 4.
Properties ​
Targets | targets | Targets.ENEMIES |
float | max_range | 40.0 |
int | pierce_count | 0 |
bool | stops_at_world | true |
VFXSelection.VfxLocation | muzzle_point | VFXSelection.VfxLocation.HEAD |
Methods ​
void | specific_effect_logic( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
bool | is_one_off_application() |
Enumerations ​
enum Targets ​
The options of targets: enemies, allies, everyone, target only.
- ENEMIES =
0- hostile entities; allies and neutrals are passed through - ALLIES =
1- friendly entities - EVERYONE =
2- any entity - TARGET_ONLY =
3- only the entity the shot was aimed at
Property descriptions ​
Hitscan
Targets targets = Targets.ENEMIES ​
Which entities the shot hits (the others do not stop it)
float max_range = 40.0 ​
How far the line reaches from the muzzle
int pierce_count = 0 ​
Extra entities hit after the first (0 = the first only, -1 = everything along the line)
bool stops_at_world = true ​
Walls and other solid things stop the line (off: it passes through them)
VFXSelection.VfxLocation muzzle_point = VFXSelection.VfxLocation.HEAD ​
Where the line starts on the originator
Method descriptions ​
void specific_effect_logic( effect_instance: EffectInstance ) ​
What the effect does to its target when it is applied.
String get_effect_description() ​
The text of the effect for tooltips, with its values filled in.
String get_editor_description() ​
A short text for the effect editor that says what the effect does.
bool is_one_off_application() ​
The shot happens once, when it is fired: a loaded save does not fire it again