Touch Event on Dynamic Level Menu

Get help using Construct 2

Post » Fri May 01, 2015 5:51 pm

I'm using an array to store levels and calling these out to a menu page using a foreach loop - all working fine so far.

So how do I make these dynamically spawned sprites (which are within a foreach loop) into:
A. Touch events
B. How do I make them pass values to the next layout
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Sat May 02, 2015 1:13 am

Ok I got it.
What I did was:

1. Removed calling the levels from an array as the levels were going to be numbered anyway. So I just created a global variable called "totalNumberlevels" and used a for loop to print each button
2. Assign a global variable "levelSelected"
3. Used on clicked get the UID instance of the button and passed this to the global variable "levelSelected"

Works a treat.
Onwards and up.....
B
9
S
3
Posts: 146
Reputation: 1,150


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests