28.02.2016, 04:34
Hello, everybody. Well today i have an issue with KEY_UP, i know that i cannot be used under OnPlayerKeyStateChange, so it brings me an issue. I am using a menu and i need for the values in the my array to change every time i either press KEY_UP, or KEY_DOWN so i would know where i am at and so that my NPC would, be holding a right object. What i did is i put GetPlayerKeys, under OnPlayerUpdate and it does work, but there is an issue. The issue is that it recognizes the key even when it is being held down and then my array gets screwed up, since the menu selection does not change when the key is held down. How can i only recognize when KEY_UP or KEY_DOWN is only being pressed and not held down? Or is there a different way to do, that i am trying to accomplish here? And i am basically, just trying to remake a Single Player food ordering system.