GML SOLVED - DrawGUI(), changing sprite sub_images?

Discussion in 'Programming' started by Amon, Oct 12, 2019 at 12:55 AM.

  1. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    272
    Code:
        for ( xi = 0; xi < 22; xi++ )
        {
            draw_sprite(spr_light, 0, x + xi * 32, y);  
        }
    
    The above code is in my DrawGUI event. Rather than use 22 draw_sprites I put it in a for-loop.

    How would I approach changing the subimage of each sprite or just one sprite after a timer event hits 0?

    Using objects, this was easy.

    EDIT///////////////

    Solved the issue b y using an array and the get set array commands. :)
     
    Last edited: Oct 12, 2019 at 2:48 AM

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