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

pre-game character customization

Discussion in 'Programming' started by piksil_demon, Aug 27, 2016.

  1. piksil_demon

    piksil_demon Member

    Joined:
    Aug 16, 2016
    Posts:
    235
    the video below shows about what i want, a selection of multiple body parts, and clothes to allow the player to have a unique character to play as.
    problem is, i have no idea where to even start on this. would it be to much to ask someone to slap together some sample code so i can get an idea of the goings on with this?

     
  2. Bingdom

    Bingdom Googledom

    Joined:
    Jul 1, 2016
    Posts:
    1,680
    My approach would be to use as little objects as possible.

    So i would have 1 character object and a couple of sprites for the clothes

    I would do something like this

    CREATE EVENT
    Code:
    hair = 0;
    shirt = 0;
    pants = 0;
    shoes = 0;
    DRAW EVENT
    Code:
    draw_self();
    draw_sprite(SPR_Hair,hair,x,y-10);
    draw_sprite(SPR_Shirt,shirt,x,y);
    draw_sprite(SPR_Pants,pants,x,y+5);
    draw_sprite(SPR_Shoes,shoes,x,y+10);
    Then have buttons to add the variables by 1, and the image will automatically change. ;)

    Also, make the sprites white, if you want to change the colours. You can change the colours using image_blend.
     
  3. piksil_demon

    piksil_demon Member

    Joined:
    Aug 16, 2016
    Posts:
    235
    that actually works great, i can set up this code to play in room 1. any idea how i would change just the color of the iris foe the eyes?
     
  4. Bingdom

    Bingdom Googledom

    Joined:
    Jul 1, 2016
    Posts:
    1,680
    I think the easiest approach would make them separate from the sclera, and make the sprite white, with a image_blend. There are a couple of shaders out there(i think) that would replace certain pixels but that might be more difficult.
     
  5. piksil_demon

    piksil_demon Member

    Joined:
    Aug 16, 2016
    Posts:
    235
    seems a bit complicated... ill probably just set up a different selection for both of them. thanks as always for the help :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