groups in event sheet

For questions about using Classic.

Post » Fri Feb 08, 2008 1:44 am

my code is getting lengthy , and I was wondering what the best way of keeping it tidy.

I can't figure out how groups work - is there some kind of folder like structure for displaying / undisplaying sections of code? do groups even work like this?

thanks yet again
B
4
S
2
G
5
Posts: 149
Reputation: 2,025

Post » Fri Feb 08, 2008 2:37 am

Right-click in the event editor and make a new group. Then right click that new group and make a new event of anything. Hit the + to show the event and drag any other events you want in that group into this area.

Afterwards delete the event you made to show it.

That's how I see to add previous events to a new group without remaking them.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Fri Feb 08, 2008 2:38 am

[quote="work3":3bcmiql2]is there some kind of folder like structure for displaying / undisplaying sections of code?[/quote:3bcmiql2]

Yeah, basically. Any events you put into a group can be collapsed down to just one line in your event sheet.

Another benefit of groups is that you can activate/deactivate them at runtime. Say you have a bunch of events that you only want to run at a certain time, like inventory menu controls or something. You can have them deactivated most of the time, but when you open your inventory menu you disable your play control group and enable your menu control group.

Another good way of sorting your code is by including separate event sheets. This is what my main event sheet looks like:



There are no events... just includes to other event sheets. Each sheet has a specific purpose. This keeps things tidy and modular... for instance, if a level doesn't have the shotgun enemy in it, you can just leave the "Enemy - Shotgun" event sheet out. If a level has moving platforms in it, just include the sheet that runs your platforms, etc.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Feb 18, 2008 2:25 am

A PM was sent to me a while ago that I just now noticed, asking how to rename your event sheets. When you click on Manage Event Sheets in the app properties or the project ribbon, click once to highlight the event sheet name you want to rename, then click again on the name to bring up the edit box. It's not a double-click, more of a "soft" click, like click-pause-click.

(Hey Ash... perhaps an edit button in the dialog box would make renaming sheets easier on folks, like the one in the global variables dialog. Just a suggestion ;) )

Anyway, sorry for the late response and double-post.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests