How do I...Arrays

Get help using Construct 2

Post » Fri May 24, 2013 4:40 am

Hey, i read Arrays manual, and i managed to create one , but i had a problem.

Look, i need a "panel" of 10 invisible buttons. so i created an Array, height 10, widht and depth 1.

now, i created a function wich executes some actions for each of the Array "squares" or "places" .

Then, what i need is to know WICH "invisible button" so wich PLACE of the array was touched, so i can pass it by parameter.

For example:

Square 5 of the array is touch, thene xecute the function and pass the 5 by parameter.


Thanks you, hope you understood.
B
6
S
2
G
2
Posts: 8
Reputation: 1,583

Post » Fri May 24, 2013 4:59 am

and what with this by the way, i added an array object, all okay, then i added an event with On touch ArrayObject.

Then when i touch on the screen (on the game ofc) it crashes.

screenshoot: http://prntscr.com/16dr3e
B
6
S
2
G
2
Posts: 8
Reputation: 1,583

Post » Fri May 24, 2013 6:01 am

Post a capx or screenshot of relevant events, it is really hard to figure otherwise what you have done. Array itself is not 'physical' object in game world that you can touch.
B
24
S
8
G
7
Posts: 756
Reputation: 7,192


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 35 guests