OK so I'm trying to make a hiding spot in my game so player can hide from guards. I have an event in front of the hiding spot that checks if the player is pressing say UP and Z 🙂C button) if he is I execute a Set Move Route that will make the player THROUGH ON and then move him up ONE TIME and then set his TRANPARENCY ON. The thing is that if the persons presses UP and Z and keeps holding UP the set move route won't work and the player will simply not move up breaking the whole thing. I tried set variables on game_player as to lock the input handle when this was executing as a meaning to resolve but If I lock the input the handle the set move route doesn't work either probably because he fakes a input movement with it (just trying to guess). So if anyone can shed some light on this I'd be more then glad...
Oh and here's are the commands for entering:
[IMG]https://dl.dropboxusercontent.com/u/22813242/Help/key.PNG[/IMG]
What if you tried pressing up and the C button simultaneously?
Checking for button pressing in events is rather difficult because events process very quickly and if you just happen to miss that one nanosecond it won't work.
Just a quick script. Instead of being checked in nanosecond, I inserted time lag
class Game_Interpreter def wait_for_input(count, key) while count > 0 Fiber.yield count -= 1 if Input.trigger?(key) return true end end return false end endUse conditional branch, and then make a script call
wait_for_input(frame, key)- frame >> game frame which is 60 is equal as 1 second. It's used as time lag whether the certain key is being triggered or not
- key >> input key. ( :C ) is same as Z button in keyboard. And ( :UP ) for up arrow
For example :
wait_for_input(60, :C)Hope it helps
Why do you have two move routes? Just combine them into one. I don't know if it'll make a difference, but as two move routes, there IS that brief gap where something else could happen in between.
Also, what's the trigger on this event? Can you show the FULL event window, not just the commands? Since it's such an obscure issue, it could be something OTHER than the event commands causing the problem.
Ok so I got it to work after changing a bunch of things. My main problem was that I had a common event that worked with parallel process and he had a set move route that change the player's alpha so that was kinda messing up this set move route here. Anyhow, thanks to all! Thread can be closed 🙂