![]() ![]() ![]() ![]() Switch (((((direction + 22.5) % 360) + 360) % 360) div 45)In case that confuses you, let's break it down: I'm guessing that the Case is the degrees it should be moving in but, it isn't facing in the direction it should be moving in. I'm using the enemy object as a target so my goal is to hit it, thus why I need it to move randomly.Ĭase 0: sprite_index=sprite_Thunder_Viking_Running_Right break //Change these sprite names to the ones in your game!!!Ĭase 45: sprite_index=sprite_Thunder_Viking_Running_Up_Right break Ĭase 90: sprite_index=sprite_Thunder_Viking_Running_Up break Ĭase 135: sprite_index=sprite_Thunder_Viking_Running_Up_Left break Ĭase 180: sprite_index=sprite_Thunder_Viking_Running_Left break Ĭase 225: sprite_index=sprite_Thunder_Viking_Running_Down_Left break Ĭase 270: sprite_index=sprite_Thunder_Viking_Running_Down break Ĭase 315: sprite_index=sprite_Thunder_Viking_Running_Down_Right break I'm looking to have my enemy object moving randomly in 8 directions with it facing & moving in the same direction. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |