PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Add a "Require line of sight" constraint to the Entity Attack widget

HipHopHuman opened this issue ยท 5 comments

commented

Describe the feature

A checkbox on the configuration modal for the Entity Attack widget, labelled "Require line of sight", that when enabled, forces the drone into a behavior where it will only attack entities that it can see.

Reasons why it should be considered

At the moment, drones can sometimes attack entities that are behind solid boundaries such as walls. For those wanting a little more flexibility in attack behavior, this will be useful.

Additional details

No response

commented

Added in 1.18.2 (3.1.4 release), but I'll probably backport this to 1.16.5. So keeping it open for now.

commented

Added in 1.16.5 now too (2.15.8)

commented

Yep: .setCheckLineOfSight(<true|false>)

commented

Is there any way to control this via the Drone Interface when calling setAction("entity_attack")?

commented

Oof, it doesn't exist in 1.18. My workaround was to add a condition and jump to an entity attack widget, and then use setVariable and exitPiece to trigger an attack with line-of-sight checked.