Arrowkey lag

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Peacfulrvr
Posts: 34
Joined: Mon Nov 03, 2014 7:11 pm

Arrowkey lag

Post by Peacfulrvr » Sun Dec 14, 2014 11:06 pm

In my game if you press the arrowkey it moves. If you hold the arrowkey down there is a lag then it continues moving without repeated pressing and releasing. It seems like there should be something like mousestilldown that works with arrowkeys. Is there a way to do that?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Arrowkey lag

Post by jmburnod » Sun Dec 14, 2014 11:24 pm

Hi Peacfulrvr,
If you want move a control to the direction of the last arrowkey pressed, you have to use a "send in time" loop.
When you press an arrow key, you set a customprop of the control that move
At each loop, LC gets the direction and move the control to the direction according the arrokey pressed.
I understand correctly what you want ?
The next step is decide what stop it.
Best regards
Jean-Marc
https://alternatic.ch

Post Reply