Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Button Input Processing and Conditional Branch Help

Seriously guys, I don't know how to ask for help about this except:

Is there any possible way to make a button input processing event where if nothing is pressed, something happens? I know how to make it so if something is pressed, but what if nothing is pressed? Hope I explained well enough
 
In your Conditional Branch, check "Set handling when conditions do not apply.

@>Conditional Branch: The A button is being pressed
@>
: Else
@> <put your 'not being pressed' commands here>
: Branch End
 
Brewmeister":3cbtaol2 said:
In your Conditional Branch, check "Set handling when conditions do not apply.

@>Conditional Branch: The A button is being pressed
@>
: Else
@> <put your 'not being pressed' commands here>
: Branch End

I know how to do it with "The A button is being pressed". But I'm using

@>Button Input Processing: [0050: key]
@>Conditional Branch: Variable[0050: key] == 13
@>blahblah event


The reason I use Button Input Processing is because "if A button is being pressed" requires the player either to hold A or smash A. So my question was if I used Button Input Processing is there a way to make it so if nothing is pressed within a certain time, something else happens.

Thanks :)
 

Zeriab

Sponsor

So use a bunch of conditional branches each checking if a particular button is being pressed. It's not pretty, but it solves the problem.

P.s. technically Button Input Processing waits for a key trigger which is different from a key press. A trigger happens when you press a key down. To make another trigger you have to release the key and press it down again.

*hugs*
 
Zeriab":3a3ms5sl said:
So use a bunch of conditional branches each checking if a particular button is being pressed. It's not pretty, but it solves the problem.

P.s. technically Button Input Processing waits for a key trigger which is different from a key press. A trigger happens when you press a key down. To make another trigger you have to release the key and press it down again.

*hugs*

Hey Zeriab, thanks :) but that's not what I want :/ I was wondering if there was a way to make a conditional branch to check if no key was triggered. Umm maybe an example scenario would make more sense:

Player walks into map. A wolf notices player, and starts running towards him. Wolf jumps towards player. If player is able to press C in a certain time, player will counter attack. If player pressed wrong button or no button at all, wolf successfully attacks.

Hope that made sense. Thanks :)
zeus81":3a3ms5sl said:
The Button Input Processing wait for an Input, so until you press a key it won't go further.

So it's impossible for me to make an event like above?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top