Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make an AI with a hitbox in a scrolling game
- gamer_011
-
Scratcher
7 posts
How to make an AI with a hitbox in a scrolling game
I am trying to make an Among Us game but can't figure out how to make the AI hitboxes work, does anyone know how?
- Nezon
-
Scratcher
1000+ posts
How to make an AI with a hitbox in a scrolling game
Hitboxes are OSs (Operating Systems) or moving systems for an animation sprite. The hitboxes work on all of the sprite's code, while the animation sprite controls the costumes. What type of hitbox are you looking for? OS or MS?
Last edited by Nezon (Oct. 9, 2020 04:29:26)
- gamer_011
-
Scratcher
7 posts
How to make an AI with a hitbox in a scrolling game
I'm just looking for a hitbox so the sprite doesn't move inside of walls. I don't know what one that would be.
- Somari
-
Scratcher
48 posts
How to make an AI with a hitbox in a scrolling game
Get the item # of an AI's next coordinates.
If the item at that item # + 1 equals wall, then stop them from moving to that coordinate.
If the item at that item # + 1 equals wall, then stop them from moving to that coordinate.
- gamer_011
-
Scratcher
7 posts
How to make an AI with a hitbox in a scrolling game
Get the item # of an AI's next coordinates.Will that work offscreen?
If the item at that item # + 1 equals wall, then stop them from moving to that coordinate.
- kaiel
-
Scratcher
2 posts
How to make an AI with a hitbox in a scrolling game
I have a great idea, I don't know how the hell i can explain it XD, are you still interested?
- Nezon
-
Scratcher
1000+ posts
How to make an AI with a hitbox in a scrolling game
move (10) steps
if <touching color [#494c32] ?> then
change y by (-10)
end
- Discussion Forums
- » Help with Scripts
-
» How to make an AI with a hitbox in a scrolling game