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?
Special input event script?
RPG Maker XP/VX General SupportI 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...
...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.
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...
- if $game_switches[2] == 4
- # do stuff
- end
Expand to see the code.
...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.
Input.press?(Input::ALT)
seems to be a bit more reliable.
seems to be a bit more reliable.
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
Original thread: https://www.hbgames.org/forums/viewtopic.php?t=70940