Layout navigations and Particle Physics help

0 favourites
  • 2 posts
From the Asset Store
Perfect Particles
$2 USD
80% off
Particles support animations, collisions, effects and etc.
  • Hi everybody! I am absolutely loving construct 2. It's extremely easy and useful and has had me hooked for weeks.

    I'm having a few issues with my latest game though and I can't figure out how to solve them.

    First up is the navigation between layouts.

    I followed a tutorial on this forum for layout navigation for layouts that use the same event sheet, but whenever I click to go next it takes me back to layout 1.. Maybe an error in naming but I don't see what I've done wrong.

    I want to do this so I don't have to use an event sheet for every layout, and free up valuable space for more events.

    Here is what I want to achieve with less event sheets: dl [dot] dropboxusercontent [dot] com/u/91770939/towerworking.capx

    Here is what I've tried to do with navigation: dl [dot] dropboxusercontent [dot] com/u/91770939/towertest.capx

    also note the button I'm using for the navigation is "lv4test"

    What else is bothering me is the particle spawning when it has a physics behaviour. The particles with physics behaviours do not spawn where they are meant to, they spawn maybe 50 pixels above..

    [Note that the particles which have physics behaviours in my project are the invisible ones]

    How can I make better explosions that spawn directly at the source and interact with the other sprites?

    Any help or feedback would be fantastic <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Welcome to the forum :)

    There are two different events for switching layouts, not really sure why. But anyway, one of them is where you have to type the name of the layout you want to go to, and the other you just select it in a drop down. Why you wouldn't just use the drop down always im not sure, as it automatically updates if you change the name of the layout anyway, where the other one doesn't. But try to use that one instead.

    Using a new event sheet for every layout, is not a bad idea. As your project grows keeping track of things can be a huge problem, if you throw all the events in one sheet, you will very quickly start to loose track of whats going on. Besides that you can just include event sheets into layouts.

    Some tips for you, as I also started out just throwing everything into one event sheet, which costed some projects and some hair :D

    Make 1 event sheet named the same as layout, and keep this as the standard. Even though you might not actually add anything to it, but then you have it in case it suddenly makes sense to use it. If you need something from the other events sheets just include them.

    Make event sheets that take care of specific things in your game, for instant:

    Enemy

    Player

    Map generator

    Menu

    Sound

    etc.

    And just include them in the layout where you need them.

    If you use functions, never add them to the same event sheet where you have actually events, like "on Mouse", "Key down", "Every 1 sec" etc.

    But put them in there own event sheet, and again just include them where you need them.

    So your event sheet layout might look like something like this:

    Enemy

    Enemy functions

    Player

    Player functions

    ....etc.

    The reason for this, is that functions will never run unless called. So if you add them to the same event sheet as the actual events are, and then include it. Suddenly you might experience weird errors. Because some of these events triggers because you accidently forgot to take something into account.

    In general I would also suggest that you start getting used to use functions as much as possible. As it will speed up making the game. But also make the game a lot easier to troubleshoot. As a function is very easy to test....."You put something in, so you expect something to come out again". And if the output doesn't give you what you expected. You know that either the input or something in the function is wrong, and is much easier to troubleshoot.

    The project im current working on have 3 layouts, 15 events sheets with 1834 events/functions. Imagine having all those in one sheet, without organization and lots of functions this would have gone wrong a lot time ago :D

    So I would strongly suggest you start to organize your projects, even if they might be small now, just so you find a good way to work with them. I promise you it will save you a lot of problems and frustrations later on. :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)