Attack Placeable Script

I have placed an exploding barrel in the form of a ship. The idea is when the ship appears, invisible npc’s with ranged weapons, placed behind turrets will fire and the appearing enemy ship will be destroyed (so it appears that the ships turrets are firing). The issue is the npc’s won’t attack even though I am using an attack placeable script and their perception range is unlimited?? I can manually make the npc’s fire of course, which defeats the purpose. Any auto attack placeables scripts out there?

Some basics:

  • NPCs need to be in a different faction from the ship
  • NPCs need to be hostile to the ship
  • If they perceive the ship before going hostile, they won’t attack unless specifically ordered to
  • Consider which object is running the script - for example, NPCs don’t always accept orders from placeables - which you can work around by ordering the module to order the NPCs

If none of the above, post the script.

1 Like