Enemy AI using LOS/RTS Vs multiple player sprites

For questions about using Classic.

Post » Tue Mar 16, 2010 11:27 pm

Despite working on my game for freaking ages now I never noticed this oddity until a couple of days ago. It seems my little bad guys have a vendetta against one of my soldiers to the exclusion of everything else, including their own safety. While I appreciate their dedication I feel that a little focus might be in order.

The situation is this:
I have a simple enemy AI set up using LOS and RTS behaviors. The AI is
Enemy Has LOS to Player
System: Repeat For each Enemy
Enemy Move to Player

(I suspect that my problem stems from this being TOO simple but I can't figure out what I need to add to fix this)

This works perfectly with one player but when I have two player sprites there are two scenarios:

If both player sprites are moving around then the enemy AI works exactly as I would expect, they all move towards the player sprite when it enters their LOS.

If one sprite is selected and moves into the enemy LOS then one or two of the enemy will move towards the first player sprite that was created on the layout.

I have a .cap at [url:2574arz0]http://www.schwoom.com/Engine/RTS.cap[/url:2574arz0]
(Drag-select to pick the units you want to use, space to remove your selection. The soldier at the top is the first one that was created)

Edit - I'm using 99.62 and 99.82
B
4
S
1
G
3
Posts: 10
Reputation: 1,070

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests