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.

Special input event script?

Hey, i want an image to pop up when i press, say, the ALT button. I tried making a conditional branch with Script " Input::ALT ". So now when i press Alt, nothing happens. When i set it to an actual predefined button, (like button R is W on my keyboard) it works. Can someone tell me what I'm doing wrong, and how i would go about achieving this?
 
I assume this is resolved, judging from your other post... however, I'll answer the question.

If you use the Script option from the conditional branches event command, you have to add exactly the same as you'd add in RGSS, but not including the if. That means if you have...
Code:
if $game_switches[2] == 4

  # do stuff

end
...your line should be $game_switches[2] == 4.
Respectively, for your case, you need Input.trigger?(Input::ALT)

Let me add that Input checks over conditionals aren't 100% relyable in some occasions and that, as always, my signature comment applies.
 
Is that so? Are there any field tests on this, because it's quite an interesting matter... I guess even though they're radically different and will produce totally off results in most cases if used wrong, knowing that when making systems could get you quite far compared to assuming none of them works good :p
 

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