![]() SO that covers each direction I think, if I wanted to add more angles diagonally later i will mod the code but what I've mentioned is how the sprites are being drawn for now. When looking down, only downward diagonal left/right, I figure if you keep holding the down key, the final sprite will be a "crouching down or laying on the ground left/right" for the lowest shot he will be able to make. I'm trying to get these directions:Īim left /right, diagonal upward left/ right, and straight up left right as well. ![]() Yes, the player will be able to aim Straight up. There are likely some easier and quicker ways to go about what you're trying to do. What type of game are you making (platformer, etc), what perspective is it (overhead, side view, etc), is the player a single sprite / object (like old Mario games) or made of multiple sprites / objects (like a seperate legs and torso / arms like in Starbound), what is the control for this mechanic (mouse aiming, only aiming up if pushing up arrow key, etc) and what specifically are you trying to do / want your end result to be? If you're just trying to change your sprite based on where the player is aiming that looks like some overly complex code for it. ![]() You have a case for 0 and a case for 1, but it looks like "delay" only ever gets set to 5 so neither of those cases will ever occur. You're using "delay" for determining what to do in with your "switch" statement. Case 0: sprite_index=spr_aim_straight break Ĭase 1: sprite_index=spr_aim_up_slightly break ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |