Using image point in array

Get help using Construct 2

Post » Sat Apr 28, 2012 8:43 pm

Hi guys :)

I'm currently making a board game. The game itself is circular, and I'm planning to use an array to map all the positions at the game board. The problem I am currently having is that I can't seem to add an image point or a coordinate for that sake as a value in my array.

Lets say, that I want to assign the position X0, Y0 at the game board to position X0Y0 in the array, just to make it easy. There is no way to just set XY to X0,Y0 or ImagePoint1.

I have thought about maybe adding an instance variable that represents every slot in the game, and use that to map the position, and then just refer to that instance variable in the corresponding array-position.

Thank you in advance :)
B
9
S
1
G
3
Posts: 13
Reputation: 2,510

Post » Sat Apr 28, 2012 8:52 pm

Use the syntax : X0=Sprite.imagepointx(1)

It took me a while to figure, I had a rotating object and wanted to find the x value of the imagepoint.

Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Sat Apr 28, 2012 8:57 pm

Ah ofc! thank you, good sir!
B
9
S
1
G
3
Posts: 13
Reputation: 2,510


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, randomly, spcsmrf, Yahoo [Bot] and 19 guests