Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game
- cs1120768
-
4 posts
How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game
So I am working on a fighting game for my coding class project. I have all of the player characters mostly programed to switch their costumes when the buttons are pressed. However I need help with programming my characters (The ones I am using to set up my ai on), so that I can animate the sprite smoothly. Below is what have found to work, but it doesn't move to across the screen smoothly. The link for my project is below
https://scratch.mit.edu/projects/203849218/
When I receive
Forever
If not touching Player sprite
Set rotation style to left-right
Point= -90 degrees
Move 3 steps
Switch costume
Wait
Switch costume
Wait
Switch costume
(the rest is switching costumes for animating)
Thanks for the Help, Jacob
PS. look at the golza (AI) sprite which I was using as a testing sprite.
https://scratch.mit.edu/projects/203849218/
When I receive
Forever
If not touching Player sprite
Set rotation style to left-right
Point= -90 degrees
Move 3 steps
Switch costume
Wait
Switch costume
Wait
Switch costume
(the rest is switching costumes for animating)
Thanks for the Help, Jacob
PS. look at the golza (AI) sprite which I was using as a testing sprite.
Last edited by cs1120768 (April 24, 2018 02:11:52)
- crisostimo
-
500+ posts
How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game
My Beginner's Tutorial shows one way of handling movement and animation at the same time:
https://scratch.mit.edu/projects/121209255/
https://scratch.mit.edu/projects/121209255/
- TvTheCoderYt
-
2 posts
How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game
BRuH
- Vaibhs11
-
1000+ posts
How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game
Please don't necropost. BRuH
- Discussion Forums
- » Help with Scripts
-
» How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game