(Solved)How do I choose random movements within a grid

Get help using Construct 2

Post » Sun Nov 30, 2014 5:21 am

What I am trying to do is this:

There is a 5 x 5 grid with dots in the middle. A sprite will be randomly spawned and than randomly move to a neighboring dot. It can only move right, left, up, down. It cannot go outside the grid area and it cannot go to a dot from which it previously came from.

I am now using collision detection and checking conditions to control the movements, but I am getting weird and inconsistent results, which is why I am having trouble pinpointing what is wrong. I've included the capx below.

Or perhaps there is a more efficient and simple way to achieve the results?

Would appreciate any help. Thanks guys!
You do not have the required permissions to view the files attached to this post.
Posts: 693
Reputation: 20,637

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests