i_am_virgo
Member
context: so i'm currently working on a princess peach themed game as a birthday gift for my sister, and i am quite new to programming. i've been following the general Shaun Spalding platformer tutorial to get a feel for GML, and i've run into a problem when trying to flip the sprite when the direction of movement changes. by using the image_xscale variable combined with sign to return info and any given key-check or hsp variable, that should flip the sprite's image horizontally, if i'm correct.
the problem: by using this code (screenshots included), my sprite scale changes so that poor little peach looks about half her width than before. essentially, the moment i use either directional button, her scale changes. i've fiddled around with all of the object's code from top to bottom for a few hours and i haven't figured out why.
i'm very new to GML and if anyone has any advice, it would be greatly appreciated!
--
photo 1: the general animation code
photo 2: peach's normal sprite
photo 3: when homegirl tries to move and loses 50 pounds
the problem: by using this code (screenshots included), my sprite scale changes so that poor little peach looks about half her width than before. essentially, the moment i use either directional button, her scale changes. i've fiddled around with all of the object's code from top to bottom for a few hours and i haven't figured out why.
i'm very new to GML and if anyone has any advice, it would be greatly appreciated!
--
photo 1: the general animation code
photo 2: peach's normal sprite
photo 3: when homegirl tries to move and loses 50 pounds
Attachments
-
38.2 KB Views: 19
-
13 KB Views: 16
-
12.2 KB Views: 7