How do I have different choices go to the same layout?

0 favourites
  • 5 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • In the game I'm making I want the player to be able to choose different things (such as bullets to fire) and I was wondering if it was possible to have all choices lead to the same layout, but still have their choice to affect the game play. I was just going to have each choice lead to a duplicate of the same layout with the item they chose unless there is an easier way to do so. Anyone have an idea?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could have their choice affect a variable and then the events in the layout rely on that variable. For instance, if you press the left mouse button, the game checks the variable to see what weapon is equipped, then based on that it fires a different type of bullet.

  • You could have their choice affect a variable and then the events in the layout rely on that variable. For instance, if you press the left mouse button, the game checks the variable to see what weapon is equipped, then based on that it fires a different type of bullet.

    I see what you're saying but how do you make the game check what the variable is?

  • I have mine as sub-events.

    Mouse -> On Left button Clicked

    System -> [variable name] = 1 ..... here are events for that

    Else

    System -> [variable name] = 2 ..... here are events for that

    Note, you do need the "Else" condition for the second sub-event and beyond. And to get to the variable name part, it's called Compare Variable after you select the System event.

  • I have mine as sub-events.

    Mouse -> On Left button Clicked

    System -> [variable name] = 1 ..... here are events for that

    Else

    System -> [variable name] = 2 ..... here are events for that

    Note, you do need the "Else" condition for the second sub-event and beyond. And to get to the variable name part, it's called Compare Variable after you select the System event.

    Oh I didn't know about sub-events. Thanks for the help!

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