Is this best for menu selection?

Get help using Construct 2

Post » Fri Nov 30, 2012 1:36 am

I have a menu designed around layers. So I have effectively 15 layers to switch between.What I currently am using is a group that physically shecks every layer and sets them one by one to visible/invisible regardless. Which brought me up to over 40 events. My questions is.

Will this work? I'm afraid to commit to the change and have to redo everything all over again if it doesn't:


I think the logic is sound but any thoughts or ideas on how to further optimize? This brought me down to just over 20 events from the over 40 if it works.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Nov 30, 2012 2:04 am

I would just add all the elements to a family, rather than add all the layers.
That way you can change all parts by referencing the family.
Also if you insist on using loops, you should check out for loops, and use loopindex, rather than adding a local.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Fri Nov 30, 2012 2:16 am

@newt

Add all the elements to a family? So draw them off screen then move them all on screen when the menu is selected? Wouldn't that increase the events for drawing? Or am I thinking wrong regarding what you mean?
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Nov 30, 2012 2:24 am

No they can all be 0 opacity/ invisible on the same layer.
You just need to keep track of the z order if they overlap one another.
Like I said just reference the family, like on your condition set family opacity to zero.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Fri Nov 30, 2012 2:32 am

Ahh :)
B
68
S
21
G
15
Posts: 701
Reputation: 15,604


Return to How do I....?

Who is online

Users browsing this forum: Radulepy and 7 guests