Help with simple AI - Almost there

Get help using Construct 2

Post » Sat May 04, 2013 3:08 pm

Hi folks - just need a little help here. I've gotten close to what I'm after but there seems to be a bit of a big in what i've done.

I've gotten the random spawning of enemies happening and in my first test, i have the first single enemy run to the player within a certain range of the player's approach. When I've set up the random spawn events, only one enemy follows runs to the player and then all created instance copy the motion of the first enemy. Im probably not making sense here - so i've provided the messy capx (below).

I've placed the enemy (one for now) in a family and set the events for that family.

I need each created instance to run to the player, not just synchronise to the first instance (or whichever instance its actually working on). I tried pathfinding but i dont think i did it right.

Any help on this would be greatly appreciated!

http://www.filedropper.com/gamewip
B
6
Posts: 30
Reputation: 1,260

Post » Sat May 04, 2013 4:15 pm

Use a "for each" enemy loop at the beginning of your chase the player logic.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Sat May 04, 2013 4:27 pm

Awesome! thanks for the help, that did it!
B
6
Posts: 30
Reputation: 1,260

Post » Sat May 04, 2013 4:30 pm

Yo!

Check out the below:

https://dl.dropboxusercontent.com/u/25721687/gameWIP_CRN.capx

Am not sure if the result is what you had in mind, but your logic is now working on individual sprites.
B
10
S
3
G
2
Posts: 7
Reputation: 2,438

Post » Sat May 04, 2013 4:43 pm

thanks crain! same as bluephaze's solution which worked :)
B
6
Posts: 30
Reputation: 1,260


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jul, nicklowkcmagic and 17 guests