Recently I have been working on a game that is a lot more complex then most of my previous ones, and I have hit a large problem concerning AI behaviors not functioning correctly.
What I am trying to achieve is a top down space game where there is three factions, Alliance, Pirates and Empire each with at least three different types of ships. I wanted each ship, once it had become into a certain range of an enemy (LOS behavior) to periodically launch fighters, smaller objects with the turret and bullet behavior. I had each races ships entered into a family, "Alliance", "pirates" etc which I was hoping would prevent me having to create events for each ship object. BUT, then when one ship from one family found and enemy and launched its fighters, the rest of the objects in that family also did. I fixed the problem as in the CAP below by having a much more lengthy event sheet with lots of ORs for individual objects, if that makes sense.
I have posted a CAP below of my game because it has a lot of events that may have caused the problem, and I am hoping someone with more experience with Construct can go through it and explain how to fix the problem. The CAP is my entire game, which has a lot of events and stuff already in it as I wasn't sure how to replicate the problem in a simpler CAP. I have all the events in groups, which should make it easier to navigate. The last two are the ones I am having problems with.
The current problem is that the Pirate faction ships (rusty coloured, spawn at random planets every 15 seconds) work correctly, they launch fighters and the fighters attack the correct targets, most of the time. But the Alliance ships often do not at all, or launch a fighter that ignores its turret behavior events and flies straight. It all seems very random, sometimes they work and sometimes they dont...
I hope that wasn't too lengthy, I hope the CAP make sense as there is a fair bit more in the CAP then just the fighter spawning, but that all works correctly. Thanks in advance!
CAP:
http://www.mediafire.com/?0g8oeugsx3dj4q9