Help.
I can’t explain this too well, but here’s what I’m trying to do: I want 100 or so little dots to follow the leader, which the user controls with arrow keys. Inspired by Pikmin. I’ve got all that down. Let’s throw in some terrain.
Turns out that terrain is a real [insert favorite obscenity here]. Especially when you have so many movie clips that are affected. All I could crank out without crashing the swf was to simply move the dot to the last position in which it was NOT touching any terrain, and just leave it there. This results in the dots getting, sort of, STUCK … words escape me:
[center]
[/center]
It’s plain what paths the dots should be taking to reach their leader, but in this example they remain UNMOVING. So they would need some kind of pahfinding algorithm to make their way around things. Nothing complex; if there’s a wall between the dot and the leader, a barrier whose surface is perpendicular to the path from the dot to the leader, the dot should just give up and sit there. But if minimal moving around would get the dot to the leader, let it be.
If anyone could help, I’d be in your debt – no, I’d worship you.
The actions concerning collision and movement are in the library, in the *pikmin *MC.