Discuss Scratch

Notadog8776
Scratcher
14 posts

Double Jump

I need to make a double jump script that only activates after you collect a certain item.

Scratch is acting up and not letting me post the script I currently have, so I can't really show anybody what I'm looking for

Last edited by Notadog8776 (Dec. 1, 2021 15:19:01)

deck26
Scratcher
1000+ posts

Double Jump

Sharing the project is the best way anyway.
Notadog8776
Scratcher
14 posts

Double Jump

Here is the Turbowarp link: https://turbowarp.org/609803085
deck26
Scratcher
1000+ posts

Double Jump

Rather than duplicate the right left movement for when Items contains Hermes boots use a variable. Set it to 5 initially and to 10 when you add Hermes boots to the Items list. Much tidier than duplicating code.

So it looks like you want Items to contain Double Jump to allows a double jump. I assume that means jumping while still in mid-air rather than jumping further from a platform (in which case the above would fit that as well).

Can you only double jump once during a jump or do so repeatedly? If the latter you just need to know your Items list contains the necessary item and jump is greater than 0. If you can only do it once per jump you'd need a variable recording whether you've used it within the current jump.
Notadog8776
Scratcher
14 posts

Double Jump

I intend to have it so you can jump off the ground, and jump once more before having to hit the ground again to replenish your jumps.
deck26
Scratcher
1000+ posts

Double Jump

Notadog8776 wrote:

I intend to have it so you can jump off the ground, and jump once more before having to hit the ground again to replenish your jumps.
So, as I said above, use a variable to record whether you've done a double jump during the current one.

Powered by DjangoBB