Double Tap Dash?

Was trying to make a double tap (for example hold d to walk, double tap and hold d to run) dash system and its just not working out for me. This is my best attempt so far: PlayCanvas | HTML5 Game Engine (Scripts > Movement > WalkScript) Help?

Hi @Literally_Kirby!

Maybe because on line 64 till 68 you create some variables without using this. Later it looks like you use these variables with using this.

Because of the grey color of the variables you can see they are currently unused.

okay I’ve fixed that but it still doesn’t work

You can add some logs to see which part of your script is failing. Open the console of your browser with the F12 key to see the logs. Below two examples.

console.log('Check 1');

well now it flickering between check 0 and check 1

If that’s not what you expected you need to check the statements before these logs. Probably there is something wrong.

1 Like