I am trying to get my badguy sprite to flip when he changes directions but flipping him like I flip mySprite doesn’t work. Any ideas on where or how to code this.
Welcome to the forum! Let me look into your code and see the best way to do this.
This is where I come in and say:
Use @richard’s character animations extension! It allows you to design animations and it will automatically start and stop animations based on certain rules you define. But it doesn’t solve the problem of flipping them. But if you post your image by copy and paste it here, I can flip it for you.
Not related, but I only have to type
git for https://github.com/riknoll/character-animations to come up lol.
Also not related, but I made a gist for very useful MakeCode Arcade extensions:
Hopefully, some of the extensions can help or extend your game!
The problem is when you use
You are only referencing the last “badguy” sprite created. so it will only flip one enemy. Another issue is that when the x velocity is greater than zero the image will flip constantly, making it flicker. Instead, you can just do a “flip image horizontally” whenever you change the velocity of your badguy, like so:
Hope that helps!
That is awesome! Thanks so much Shakao!