Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Making a sprite jump automatically
- Algid-Games
-
Scratcher
11 posts
Making a sprite jump automatically
Hello!
I am programming an enemy for my platformer game, and I wanted it so that the enemy will jump over gaps. So far I've tried making a detector costume of the enemy sprite, and making the level set a variable, which in turn makes the enemy jump. However, this makes the enemy always jump when it's direction is -90, and never jump when it's direction is 90.
Project link: https://scratch.mit.edu/projects/607615483/
Thanks in advance!
I am programming an enemy for my platformer game, and I wanted it so that the enemy will jump over gaps. So far I've tried making a detector costume of the enemy sprite, and making the level set a variable, which in turn makes the enemy jump. However, this makes the enemy always jump when it's direction is -90, and never jump when it's direction is 90.
Project link: https://scratch.mit.edu/projects/607615483/
Thanks in advance!
Last edited by Algid-Games (Nov. 26, 2021 23:42:52)
- bcs320jn
-
Scratcher
100+ posts
Making a sprite jump automatically
I made a slightly broken and very inefeciant AI here: https://scratch.mit.edu/projects/607653508/
- Discussion Forums
- » Help with Scripts
-
» Making a sprite jump automatically