How do I set 2 dimension array for coordinates

Just started using Construct 2? Post your questions here

Post » Fri Jan 13, 2017 4:31 pm

Hi,

I wanna to save the mouse X and Y coordinates in a 2 dimension array many times but I want to keep the previously coordinates too in this array.

Example:

I have a 2 dimension array (1,2,1) at the start.

0 (<- for X coordinate of mouse position)
0 (<- for Y coordinate of mouse position)

When I click by mouse it must record in the array the actually XY coordinates

322
568

If I click again it need to keep these values and record the new ones in a new column

322, 102
568, 878

and so on...

322, 102, 025, 957 ... (X coordinates of mouse)
568, 878, 100, 378 ... (Y coordinates of mouse)

(1.) , (2.) , (3.) , (4.) ... (at first click, second, third etc...)

Many thanks for the solution!
B
5
S
1
Posts: 37
Reputation: 441

Post » Fri Jan 13, 2017 10:42 pm

Image
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests