Layer filter idea

Discussion and feedback on Construct 2

Post » Wed Apr 18, 2012 8:24 am

I was thinking a "Layer filter" or "Smartlayer" might be useful.
Basically a toggle or tickbox that would hide or grey out any code that isn't relevant to your currently selected layer.
Eg. If the background layer is selected, only code for content on the background layer and variables that that code uses are shown.

(Using multiple event sheets is getting more and more confusing)

B
21
S
7
G
3
Posts: 33
Reputation: 4,522

Post » Wed Apr 18, 2012 1:53 pm

I don't know - what layer does the event "Start of layout - set global variable to 1" count as being on? What if an event applies to multiple layers? What if you dynamically move objects between layers at runtime, so one event actually does apply to a layer at runtime, but the editor doesn't think it does?

Maybe you just need to use more event sheets, organise everything in to groups and includes, and use more comments. It should be possible to make well-organised events without that feature.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Wed Apr 18, 2012 7:02 pm

I think you're right, I didn't consider objects switching layers like that. Thanks for considering it anyway.
B
21
S
7
G
3
Posts: 33
Reputation: 4,522

Post » Wed Apr 18, 2012 9:10 pm

What exactly are you using layers for? I don't see the need for this without knowing your situation...
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Apr 19, 2012 6:32 am

I found it easier to start a new event sheet for each layer as I was originally putting everything in one single event sheet and it was getting really hard to navigate.
So one for the HUD overlay, inventory box, background, buildings, usable objects, enemies and a couple for different menus. (I know I'm forgetting a few but you get the point)

I was imagining a cleaner version would essentially be a feature keeping it all in one sheet but dynamically show only the code relevant to the area you're working on.
Perhaps I should have suggested a feature filtering the code that affects a single selected object rather than a whole layer.

I think I just need to rethink the way I'm splitting things up and just need to keep track of everything on a big sheet of paper or three, but thanks anyway.
B
21
S
7
G
3
Posts: 33
Reputation: 4,522

Post » Thu Apr 19, 2012 10:35 am

[QUOTE=Blam]Perhaps I should have suggested a feature filtering the code that affects a single selected object rather than a whole layer.[/QUOTE]
Try just typing the name of an object in to the 'Event search' box on the ribbon.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Thu Apr 19, 2012 1:28 pm

after using alot of approaches i found out that making good use of groups is the way to go, and keep reordering these in logical sense, and every time i start some new events, make a group, using alot of eventsheet i found i constantly jumping from eventsheet to evensheet, while now i just need to find the right group
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Thu Apr 19, 2012 1:30 pm

D'oh! That's embarrassing.
Thanks Ashley.
B
21
S
7
G
3
Posts: 33
Reputation: 4,522

Post » Thu Apr 19, 2012 1:41 pm

Thanks Vtrix. I have been using groups but I think the problem is more with designing as I go rather than getting it all out first. The groups end up overlapping each other and either contain too much to too little, then I end up with closely related code being in completely different sections. At least this has been a good learning experience. I think I better notch this up as a prototype and start over. Such a mess.
Blam2012-04-19 13:43:26
B
21
S
7
G
3
Posts: 33
Reputation: 4,522

Post » Thu Apr 19, 2012 3:28 pm

I look at groups sorta like functions/methods. I group events in there that would all make sense if run/used at the same time over and over.

it helps keep things organized and stop you from repeating the same events in multiple places.

My only issue is with the drag and drop arranging of events its a lil touchy sometimes especially when tryin to put events "over" other events. Like dragging a lower event up to a higher place. It wants to subevent the one above where Im actually tryin to put it instead of puttin it between it and one below it.
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Next

Return to Construct 2 General

Who is online

Users browsing this forum: hollowthreat, Solomon and 7 guests