Grid movement with multiple actors?

Get help using Construct 2

Post » Thu Apr 10, 2014 2:33 am

This is mostly self-explanatory.

I started with this (thanks Yann!) http://dl.dropbox.com/u/23551572/C2/gridMovement.capx

I tried to rework the code to handle multiple actors moving on a grid.
https://dl.dropboxusercontent.com/u/25752478/c2examples/multiplegridmovers.capx

How it should behave: Each actor that isn't going to walk into a wall should move. If some actors can move and some can't, than those that can move should and those that can't shouldn't. Straight forward. But it doesn't work that way.

I'm guessing the problem has something to do with choosing instances of an actor, as only the first actor instance gets checked for passability. Help?
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Thu Apr 10, 2014 10:53 am

I'm guessing the problem has something to do with choosing instances of an actor, as only the first actor instance gets checked for passability. Help?


Your picking is fine for this, you just need to add a "for each".

Image
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Thu Apr 10, 2014 7:37 pm

Awesome, thanks. :)
B
12
S
3
Posts: 39
Reputation: 1,001


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, dop2000, MaxxMunnn, richcoz81 and 33 guests