How do I group objects/spawn groups?

Get help using Construct 2

Post » Wed May 27, 2015 5:38 pm

I have a few ideas, specifically UI related, and they seem like they'd be easier to accomplish if I could somehow group the buttons together and spawn them as a group. I thought somehow the families function would be what I wanted but it wasn't. I need to wrap several sprites together and be able to spawn the unit at once..

Is there an easy way to do this? or will I have to spawn something that spawns other things at image points :/

Thank you!
B
4
Posts: 22
Reputation: 244

Post » Wed May 27, 2015 5:44 pm

i think you can use a function there.
Click the game layout screen on construct and under the section general select "function"

Then add an event function > on function, and name it whatever you want. Inside this event put the code to spawn all the buttons that you want to be spawned at once.

Then whenever you want to spawn all the buttons instead of writing the same code over and over again you just create the action function > call function and set the name of the function you'd like to use.

Hope it helps :D
B
17
S
7
Posts: 280
Reputation: 2,522


Return to How do I....?

Who is online

Users browsing this forum: farfetchd83, Google [Bot], zenox98 and 15 guests