Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Arrow key events (http://www.alice.org/community/showthread.php?t=10530)

jrrTolkien 03-03-2014 09:19 AM

Arrow key events
 
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.

MrMoke 03-03-2014 10:16 AM

Maybe, Maybe not
 
in version 2 you can right-click the "When Key Pressed" event and change it into a "While Key Pressed" event which used to do what you want to accomplish. It also gives you the ability to create Begin and End events to supplement the While.

Unfortunately, changes made to version 2.4.1 damaged the functionality of this event, and it no longer works properly. This makes many programs that worked flawlessly in the past non-functional. I notified the development team about this problem in December, but it has not been repaired.

If you are using 2.3.5 or older, it will work.

jrrTolkien 03-03-2014 01:55 PM

Aha!
 
Wow! Thanks so much! It would have taken me weeks to figure that out on my own-and I'm not exaggerating! :o This should make it much easier for me to create my game! I may even post it in the future if it works properly!:D

Thank you,
-J.R.R.


All times are GMT -5. The time now is 10:55 PM.

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.