Menu entrance help

Discussion in 'Programming' started by nick13579, Jun 12, 2018.

  1. nick13579

    nick13579 Member

    Joined:
    Jul 20, 2016
    Posts:
    43
    So I made this post because I want to do something in my game but I don't know how to. So I would love for someone to help me.

    So here is what I want to do:

    There is a menu box that pops up when on of the characters is selected. It's a shop menu that the player can buy stuff from. It doesn't cover the whole screen. It's just a rectangular object that is used as the background for the menu. In the menu, there are three buttons. I want the buttons to have like an intro transition instead of just popping up with instance_create() or something.

    The transition I want is for the buttons to slide down from above the menu until they are in place inside of the menu. However, I don't want the buttons to be able to be seen when they are above (and outside) the menu. So I think I would probably have to use surfaces to do this, but I am unfamiliar with surfaces.

    I also want transitions from each page in the menu. For example, when the "Purchase" button is pressed, the same transition happens with all the buttons, but they slide left so they are outside the menu and can't be seen, and the items the player can buy slide in from the right.

    Let me know if you need any more information.

    Thanks!
     
  2. Becon

    Becon Member

    Joined:
    Jul 13, 2016
    Posts:
    109
    I would instance_create the buttons at the top and move them to the position you want them to be as if you were controlling a player character. You can set vertical speed and move down etc. For making them visible etc you can set their alpha to go along with it's finishing position. For example if you are 100 pixels away from end position, for every 1 pixel you move closer...maker your alpha a bit "thicker" until there is no transparency when it finishes. When you hit the "Buy" button, just do the opposite with transition and alpha but move to the next position off to the left and have the new items fly in from the right. Etc.
     

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