general question: event-building

This forum is currently in read-only mode.
From the Asset Store
Enlist the menacing fleet commander of the galactic star force in your next game audio production.
  • When should I choose for inserting all conditions in 1 event-block or inserting them as sub events?

    Example:

    A>

    + System: Is global variable 'Switch' Less than 1

    + Sprite1: Sprite1 overlaps Sprite2

    + Sprite3: Is on-screen

    -> do something

    B>

    + System: Is global variable 'Switch' Less than 1

       + Sprite1: Sprite1 overlaps Sprite2

          + Sprite3: Is on-screen

          -> do something

    I -think- option B is more useful for 2 reasons:

    • if you want to add something, you can add it to a sub event.
    • if a certain condition asks for cpu, Construct won't bother if the first condition is not met.

    Am I correct?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, I agree that option B is better. If you do plan on adding more to it though (I know you were just saying that as a hypothetical), I'd personally make my own group for it, have it disabled by default, and enable the group when the global variable "Switch" is less than one. If nothing else it's good for organization.

  • - if a certain condition asks for cpu, Construct won't bother if the first condition is not met.

    First condition must be always met to run other conditions, so there is no real difference between those two examples, but B seems to be bit better for organizing. As you said, if you want to add something, you can add it to a subevent, and you can collapse the whole block, which is useful sometimes.

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