Way of disabling key event repeat in script?

Non-platform specific questions.

Way of disabling key event repeat in script?

Postby skydereign » Mon Jul 28, 2008 8:43 am

When adding a keydown event, you are allowed to enable or disable repeat. Is there a way to do so for an event in a script? I'm trying to make an object move 1 tile when pressing down a button. I have set a move variable but when I press down the key, it moves farther than the desired tile per move. Is there another way of fixing this through script?

-Edit
Found a fix, as a result of pressing right, it disabled all events from that object, and I also switched x=x+64; to a moveto. I added another object that enabled the events again if right was not pressed. It works for now, but my question remains.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Way of disabling key event repeat in script?

Postby stevenp » Mon Jul 28, 2008 11:55 am

heres a post on that

viewtopic.php?f=4&t=5138


in your case you would put the toggle in a timer so it wouldent re enable imidiatley
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score

Re: Way of disabling key event repeat in script?

Postby skydereign » Tue Dec 30, 2008 2:19 pm

I finally found a way to do this that I am content with, as it works for keyup and keydown.
http://game-editor.com/forum/viewtopic.php?f=6&t=6400
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron