How do I evaluate the 4 directions

Get help using Construct 2

Post » Tue Apr 28, 2015 2:39 pm

would like that when the robot touches the yellow cube, evaluate the 4 directions:
Up, Right, Left, Down, and chosse one of the possible free directions.

PLEASE HELP ME !! :cry:

Feel free to change all the programming code. :geek:

Here is a video that I want to do:
https://www.youtube.com/watch?v=UaqbN480Wog

image:
https://drive.google.com/file/d/0B9uHUU ... sp=sharing

file .capx
https://drive.google.com/file/d/0B9uHUU ... sp=sharing
B
48
S
9
G
10
Posts: 200
Reputation: 8,258

Post » Tue Apr 28, 2015 11:35 pm

Just check if the place on the top, left, bottom or/and right of the yellow cube is free.
Add a helper sprite (just a 1x1 px sprite) for collision / overlapping check. Then set the position of this helper spriter in all directions of the yellow cube (when the player is over that) and check if the helper is overlaying or collision a wall. If not the player can pass it.
B
13
S
4
G
1
Posts: 107
Reputation: 1,337

Post » Wed Apr 29, 2015 6:27 pm

I want to know is: how do I choose among the possible solutions?
NOT CONCEPTUALLY !!!!
B
48
S
9
G
10
Posts: 200
Reputation: 8,258


Return to How do I....?

Who is online

Users browsing this forum: Alvaro2, Yahoo [Bot] and 16 guests