This site requires JavaScript, please enable it in your browser!
Greenfoot back
KaiBB
KaiBB wrote ...

2012/5/14

Sprinting Key!

KaiBB KaiBB

2012/5/14

#
How would I go about doing that? So far my code is as shown below to make the player move, but when I hold the Space bar, speed does not increase. if (Greenfoot.isKeyDown("SPACE")) { move(10); } else { move(); }
Builderboy2005 Builderboy2005

2012/5/14

#
move() with no argument is not implemented in the Actor API, which leads me to ask what it is you have implemented exactly?
KaiBB KaiBB

2012/5/14

#
I really mirrored most of this Actor from Wombat. The move() I'm using is defined the same as in the tutorial. Though, it's gotten out of hand, so I'm re-typing this Actor from scratch.
Builderboy2005 Builderboy2005

2012/5/14

#
Alright sounds good. If you still have problems, be sure to post the whole code so we can check it out!
You need to login to post a reply.