How do I enemy follow through functions? [SOLVED]

Get help using Construct 2

Post » Tue Aug 08, 2017 10:25 pm

Not sure why this isn't working. Trying to get enemy slimes to move toward my player whenever the player gets within a certain range and lose the player when they are out of range. Right now it only works for a single instance of an enemy. Any ideas why this won't be working for all the instances of enemies on screen?

Image

.CAPX
https://drive.google.com/open?id=0BzhJb ... khxNGd5MGc


[SOLVED] I needed to add a For Each Enemy to the LOS event.
Last edited by VictoryX on Tue Aug 08, 2017 11:05 pm, edited 1 time in total.
Image
B
46
S
17
G
2
Posts: 201
Reputation: 4,526

Post » Tue Aug 08, 2017 10:50 pm

Well, you feed only 1 enemy to the function, while there are more of them in the picklist.

https://www.dropbox.com/s/s3ncphroda3b6 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Aug 08, 2017 11:04 pm

Okay, I thought that like if any enemy had the player is vision it would keep calling the function with that enemies unique ID making them move independently. I see how the For Each Enemy fixes the issue I was having thank you.
Image
B
46
S
17
G
2
Posts: 201
Reputation: 4,526


Return to How do I....?

Who is online

Users browsing this forum: Artcadev and 37 guests