Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
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, 10: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
Maybe, Maybe not
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 500
Join Date: Sep 2007
Location: Austin, Texas
Exclamation Maybe, Maybe not - 03-03-2014, 11:16 AM

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.
   
Reply With Quote
Aha!
Old
jrrTolkien
Senior Member
 
jrrTolkien's Avatar
 
Status: Offline
Posts: 166
Join Date: Feb 2014
Location: Middle-Earth (Merrimack, NH)
Talking Aha! - 03-03-2014, 02:55 PM

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

Thank you,
-J.R.R.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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