Hope someone can help me with what I hope has a simple
solution. I've been making a lot of games with Director 10, but now
I'm making a game, using Director 11 and I cannot get the
key.keyPressed work the way I want.
The thing is that I want to move a sprite from left to right
when the user either presses left or right arrow. The problem is
that if I use:
-- Loop script --
keyDownScript = testKey()
-- Movie script --
if (_key.keycode = 123) then -- left
if (_key.keycode = 124) then -- right
If the user doesn't press any key at all, Director still
thinks that a key is pressed.
And if I try this in the movie script, instead of using the
case (_key.keyCode) of
123: put "TurnLeft"
126: put "GoForward"
125: put "BackUp"
124: put "TurnRight"
The first second the user press a button it lags. For
example, I the user press the left arrow and hold it down, it will
take a while for Director to recognize that the arrow is held down.
Originally posted by:
Mikael(swe) on enterFrame(me)
if (_key.keyPressed(123)) then
else if (_key.keyPressed(124)) then
and that doesn't work at all... Nothing in the message