Home Artists Posts Import Register
The Offical Matrix Groupchat is online! >>CLICK HERE<<

Content

Last week's videos!

Files

Game Maker Studio: Animation Tutorial [Platformer]

Download the project files! [URL coming soon] A fresh look at hooking up basic animations for a platform game in line with the code used in this series. Play my newly released indie platformer Another Perspective! http://shaunspalding.co.uk/AnotherPerspective/

Comments

bc likes you

Hey Shawn! Got a code question ;) This is dealing with a platform shooter. I have an enemy's death animation set up as a separate object that I call up when hp<1. Animation was created facing right. How can I make it face the direction from which it was shot? I'm guessing a collision check with the bullet?

shaunjs

a lot of ways. If the original enemy faces by using image_xscale then when you create the death object you can simply use: if (hp < 1) { death = instance_create(x,y,obj_death); death.image_xscale = image_xscale; } I dunno how your system works but potentially you could also do this: if (hp < 1) { instance_change(obj_death,1); } instance_change, changes your object into another object. Carrying over things like scale, position, speed, direction, etc.