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.

[Resolved]Touch event + Pushing a key?

Alright I have a major problem.

See at the beginning of my game you select the color of your clothes. So you move a cursor (charset) over touch events, and when you're on a touch event for a specific color, it gives you a preview of how it looks like.

BUT here is where the problems arise. See when you're on one of the touch events, I want it so that if the player presses a key, it goes into the actual game (obviously) but I don't know how to pull this off. Since the event is a touch event, when the player presses a key nothing will happen. I've also tried to make a Conditional Branch in the touch event, if key is pressed teleport to the next screen. But that still doesn't work.

What can I do?
 
I'm a little unclear on how this is supposed to work. You want to check for a button push while your cursor is over a specific event that's also a player-touch event?

The problem may stem from the fact that you're trying to make your events do double duty, here, but I'm not entirely sure what you want it to do. Do you want it to respond to any key being pushed? To one specific key, such as space or Z?

One solution might involve a parallel-process event checking player x and y and also checking for button pushes, but it depends on what you want it to do.

Screenshots, as I often say, will of course make this easier to solve.
 
hmmm... I think the easiest way to do it would be to set a variable and change it to either 1, 2, 3, or 4 depending on which event your are touching, with the first being 1, the second being 2, ect...

Then in a parallel process you would check if the button you want is being pressed, then check if the variable is 4 first, then 3, then 2, then 1. and do the next scene accordingly...
 
I already resolved it, but thanks for the help. For those who are curious; First I had the touch event do what it needed to do, then I put a switch to go to the next page where the push key functions are. Then when the player moves the cursors to another touch event, it turns the switch for the first one off so it goes back to the first page.

Took me a while of brainstorming, but in the end it was quite simple. Again, thanks for your input.
 

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