0 Favourites

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

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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.

  • 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)