Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Why Do My Character reset
- Delv1243
- Scratcher
21 posts
Why Do My Character reset
when i jumped on top of the square enemy My Character Reset To Its Position , Why? Heres the project https://scratch.mit.edu/projects/559994940/
Last edited by Delv1243 (Sept. 4, 2021 08:32:05)
- Thingied
- Scratcher
1000+ posts
Why Do My Character reset
Here's my fix:
- Move the entire platforming script to be under the when I receive play block.
- Move the if touching red stuff to be on top of the script.
- Make the enemy count as collision so the player can still jump when on it.
- Make the sprite do the ground collision after the y movement so it has no chance of being inside the ground. If you move after getting out, it might look a bit weird seeing the player inside the ground a little.
And since we're on the topic of the move up custom block, you should also make it run without screen refresh so it gets out instantly. - Since there's no way the player can be in the ground now, you can remove the if touching green script since there's no point in having it anymore
- Discussion Forums
- » Help with Scripts
- » Why Do My Character reset