1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Question - IDE Drawing Individual Layers of a Sprite

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Cofefe, Nov 29, 2019.

  1. Cofefe

    Cofefe Member

    Joined:
    Nov 29, 2019
    Posts:
    19
    Hi guys.

    So I've got a question related to drawing the layers within a sprite. I mean the layers like the ones inside the sprite editor, not the 'Sprite Layers' which you can create in the room editor through code. The reason I ask is because I am currently making a game where I assemble the player sprite one piece at a time (i.e., I draw the back leg first, then the back arm, then the torso, then the front leg...)

    What I have been doing is creating one big sprite, then duplicating that sprite multiple times and deleting all layers within that sprite except for one. Then I run a script where I draw all of those sprites in order. Now the whole time I'm going through this rather tedious process, I'm wishing there was an easier way to just extract one of those layers from the source sprite through code and draw it that way. It would eliminate a lot of this busy work I'm doing, and even better I could just edit the source sprite once if I ever have to change the way an animation looks.

    Only problem is, there is no way to my knowledge to do this... that said my knowledge is quite limited. :p So I figure it doesn't hurt to ask the people here and see if anyone knows the secret to drawing individual layers inside a sprite, and if there really is no way, request it, I guess. :D

    Thanks in advance
     
  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    7,044
    The way you're doing it currently is the only real way to do it, I'm afraid...
     
  3. Cofefe

    Cofefe Member

    Joined:
    Nov 29, 2019
    Posts:
    19
    Oof, lol. Alright then, it's cool. A little bit of copy/pasting isn't gonna kill me. :D
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice