How do I keep my code organized while also functional?

Get help using Construct 2

Post » Mon Apr 18, 2016 2:51 pm

Hi all-

I've been working on a top down adventure game and as I've been putting in a bunch of time the event sheet has been getting pretty crowded. I've been getting a lot of help form the forums here and I noticed a few of the demos I downloaded used "Groups" to keep the event sheet tidy. I went through my sheets and organized but now a number of the things that I had working (enemy attack patterns, NPC custom movement) are all messed up. I think I am likely using these "Groups" without understanding how they affect the code- could you please give me a little advice here? Also is there another method of organizing the event sheets?

Thank you for any help you can give :)
B
9
S
1
Posts: 13
Reputation: 508

Post » Mon Apr 18, 2016 2:56 pm

Did you know you can "include" the contents of one event sheet in another? This plus groups is hands-down the way to go. My game has a huge amount of "global" code that handles basic things like controls, dialogue box logic, how loading zones work, etc, and then I include that master sheet in every other sheet for the individual levels so I don't have to deal with that stuff at all unless there's a problem with it. Putting things into groups shouldn't mess them up per se, as long as the groups are Active in the way you'd want, but do look into whether you messed up the order of some events by moving them into groups? Make sure Construct can cycle through all the events in order and in a way that works.
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 205
Reputation: 3,468

Post » Mon Apr 18, 2016 3:10 pm

I agree with Mikehive, it seems like an includes issue. But I don't know unless I see anything first hand. Also did you select from the event sheet and like drag and drop into the group folder? Sometimes when you do that you might select just the action itself, and not the entire event.

That could be happening, and I've done that before!
B
13
S
4
G
3
Posts: 23
Reputation: 1,967

Post » Mon Apr 18, 2016 6:27 pm

Thanks Mikehive and PandaCookies!
B
9
S
1
Posts: 13
Reputation: 508


Return to How do I....?

Who is online

Users browsing this forum: dop2000, gonzdevour and 36 guests