Skip to content

AttachEffect.CheckOnFirer does not work when the attacker fires at trees. #2068

@hidcatxvii

Description

@hidcatxvii

Description

I want to configure a unit in AttachEffects to automatically switch its firing weapon to Secondary when engaging any target type — including both Technos and trees —.

Wanted: The unit can switch to Secondary when firing at Technos and trees.

Got: The unit can't switch to Secondary when firing at trees.

Phobos Version

0.4.0.1

Conditions to reproduce

No response

INI code

[GTNK]
...
Primary=105mm
Secondary=PrismShot
**AttachEffect.AttachTypes=GTNK_AE**

[105mm]
Damage=65
ROF=60
Range=5
Projectile=Cannon
Speed=40
Warhead=AP
Report=GrizzlyTankAttack
Anim=GUNFIRE
Bright=yes
**AttachEffect.DisallowedTypes=GTNK_AE
AttachEffect.CheckOnFirer=true**


[GTNK_AE]
Animation=YURICNTL
Tint.Color=0,0,255
Tint.Intensity=0.1

Steps to reproduce

1.Add below code to some unit's Primary:
AttachEffect.DisallowedTypes=xxx AttachEffect.CheckOnFirer=true

2.Set Secondary of that unit.

3.In game, attach the AE to the unit.

  1. Let the unit fire at Technos and tree.

Expected behaviour

The unit can switch to Secondary when firing at Technos and trees.

Actual behaviour

The unit can switch to Secondary when firing at Technos, but it doesn't work when firing at trees.

Additional context

20260128_104209.mp4

Checklist

  • The issue happens on the latest official version of Phobos and wasn't fixed yet.
  • I agree to elaborate the details if requested and provide thorough testing if the bugfix is implemented.
  • I added a very descriptive title to this issue.
  • I used the GitHub search and read the issue list to find a similar issue and didn't find it.
  • I have attached as much information as possible (screenshots, gifs, videos, debug and exception logs, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions