olzstreaming.blogg.se

Game maker studio 2 how to animate an object
Game maker studio 2 how to animate an object




game maker studio 2 how to animate an object

If sprButtonCharacters' first frame is the first character, and so do other frames, you can use the value of char_ref to choose a sub-image of sprButtonCharacters to be drawn on top of the button object.

game maker studio 2 how to animate an object game maker studio 2 how to animate an object

Each frame depicts one of your characters (so, 5 char's = 5 frames). If your buttons have an index reference to a given character like this: /* Button Create Event */Ĭreate a sprite with as many frames as the number of your characters. You add just one line of code, and use an additional sprite resource representing the characters preview to be drawn on your button. Solution 1: a specific sprite for characters I can think of two different approaches, the earlier keeps code simple whilst requiring more graphics the latter needs no additional sprites though a little more code to reference the correct sprites.






Game maker studio 2 how to animate an object