Discuss Scratch

cs1120768
New Scratcher
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.

Last edited by cs1120768 (April 24, 2018 02:11:52)

crisostimo
Scratcher
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/
TvTheCoderYt
Scratcher
2 posts

How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game

BRuH
Vaibhs11
Scratcher
1000+ posts

How to make an enemy ai move smoothly towards the sprite the player controls for a fighting game

TvTheCoderYt wrote:

BRuH
Please don't necropost.

Powered by DjangoBB