Check if imagepoints are facing

Get help using Construct 2

Post » Sat Jan 05, 2013 2:58 am

Why not just use an array?
All you have to do is create an angle value either 0,90,180 or, 270, and then test if the "cells" around the object match up.
Just remember that the array coordinates would be multiplied by the grid size. IE array at x1,y1 would be x32, y32 if the individual cells are 32x32.
So you would check if array at this x, and this y has a value of 0, and the value of this x +1, and this y is 180 then you would have two pipes horizontally.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sat Jan 05, 2013 10:06 am

Thanks all i think array is the way to go although i have read the array tutorial I'm still struggling to understand how an array object works with a foreach (ordered) loop on my pipes.

can someone explain to me what exactly happens when you run this function on a layout with say 2 rows of pipes with one pipe on the top and two pipes on the bottom? How should the array look if its a 2d array

sorry hope this makes sensecurv2013-01-05 10:07:31
B
7
S
1
G
1
Posts: 25
Reputation: 701

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests