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.

Help with a simple mini game.... !

Im making a mini-game where you have to click the direction key, depending on what the picture tells you to press.

Could you maybe use variables to randomly choose the image to pop up. ( the image being an arrow facing up, down, left, or right ) And than if the timer reaches 0, you lose the item that even let you begin to start the mini-game.

Can anyone help? :!: :heart: :!: :heart:
 
set variable - random value between 0 and whatever

conditional branch: if variable is 1
show picture 1
else if variable is 2
show picture 2

That's the long and tedious way.

It could be done faster with scripts but you'd have to know how to script or request it...

Timer - there's an event command for that, there's also an event command to remove an item; again conditional branch (timer is off).

Hope that helps.
 
try something like this:

14xe1qe.png

Obviously some modification will need to be made on your end, but what that should do, is set a random value from 1 to 4 to a variable. You can then make it Show a Picture based on the variable. then it will multiply the variable by 2 to match the required direction button that needs to be pressed. Then you start the timer. using a loop, you use Button Processing to assign the pressed button to a second variable. then check to see if that variable matches the first, if so, have it do whatever you want it to, stop the time, and break the loop. Also add a check in the loop to see if the timer is 0min, 0sec or less and if so, have it remove the required item and break the loop.
 

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