View Single Post
Arrow key events
Old
jrrTolkien
Senior Member
 
jrrTolkien's Avatar
 
Status: Offline
Posts: 166
Join Date: Feb 2014
Location: Middle-Earth (Merrimack, NH)
Question Arrow key events - 03-03-2014, 09:19 AM

Hi, so I am trying to make an 8-bit game, and I am having a little trouble. I have a 2-D square as the background, and it is coloured black. I have another square with the texture map of an 8-bit person, and I made events like "When 'down' is pressed, do" and then a method for moving the square (The method changes the texture map of the square and moves it in whichever direction the key is pointing [up makes the square go up, etc.].). I can get it to actually look like the person is moving, and I am starting on making collision detection.The only problem is that you need to press the key once every time the person moves. You can't just hold the button down. I could make an event saying "Let the arrow keys move" the square, but then there would not be the texture map switching, and the person would just move the square around without animation. What I am asking is: Is there any way to make an event that does not require you to press the arrow key repeatedly?

-J.R.R.
   
Reply With Quote