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

2019/6/8

Character Dash

loldertroll loldertroll

2019/6/8

#
Is there a way to let my Character dash a short distance?
danpost danpost

2019/6/8

#
Sure -- pause the scenario and drag it with your mouse. No -- seriously. You will need an int timer field to regulate the dashing time. A positive time value means it is dashing. Also, you will need a boolean field to track the state of the trigger key so holding it down will not cause constant dashing. All you should need to do when triggered is set a positive value to the timer. The act method should check the timer value and have it count down when positive.
loldertroll loldertroll

2019/6/9

#
danpost wrote...
Sure -- pause the scenario and drag it with your mouse. No -- seriously. You will need an int timer field to regulate the dashing time. A positive time value means it is dashing. Also, you will need a boolean field to track the state of the trigger key so holding it down will not cause constant dashing. All you should need to do when triggered is set a positive value to the timer. The act method should check the timer value and have it count down when positive.
ty
You need to login to post a reply.