How do I create a HUD to select actions and cycle characters

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hi,

    I saw the Shapeshifter game by Zathan and really liked the HUD that pops up when you hold space to shift the shapes.

    I would like to implement similar mechanism to select contextual actions and show character overlays when cycling between characters. I understand how I can spawn an object in front of my Player or at a specific postion on keystorkes. But how do I pause the background and use the arrow keys to cycle through my options.

  • This can easily be done by using game states. I recommend you read about the state pattern in programming

    In construct 2 you can do it by creating a variable named "state", set it to (for example) "playing" on start, and to "shapeshifting" when the player is in the contextual menu.

    Use this variable to change the behavior of keystrokes, for example, if "state=playing" and left key is down, do this, and when "state = shapeshifting" and left key is down, do that.

    I use game states a lot and I think it is very easy once you break it down to simple states. Good luck.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the tip Zed2100,

    I've made a couple of player state guess game state might help with this.

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