Pause Menu Effects

architectpianistarchitectpianist Member Posts: 21
Hi,
I want to have a pause menu in my game, and I want the rest of the screen to get darker and the menu itself to either scale upward or fade in. The menu would be a box in the center. How can I make the background get dark and the menu transition in?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi architectpianist, there's a couple of ways to do this, both using Alpha. I'll suggest one way:

    Make a new actor called Blackout – whoops, edit: make it black -setting its Alpha to 0. Put it outside of the screen area, making sure its below the layer of your menu graphic. Also a new boolean attribute called MenuGo or something.

    In your button, or actor, or whatever triggers the fade in, put change attribute MenuGo to true.

    In the Rules of the actor Blackout, put
    When MenuGo is true
    Change attributes for size and width of your screen
    Change attributes for x and y positioning

    Timer
    For 3 seconds
    Interpolate self.Blackout.Alpha to 1

    In your Menu graphic, also with its Alpha set to 0, put
    When MenuGo is true

    Timer
    For 3 seconds
    Interpolate self.Blackout.Alpha to 1

    presuming it's invisible in the correct place on screen. You could also place the invisible correct-sized and proper x, y Blackout on screen, if you wanted, so no need to change size and positioning attributes in its Rules; whichever suits you.

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • architectpianistarchitectpianist Member Posts: 21
    You rock, gyroscope!
    I did that up to the part about the menu graphic, which seemed to do it. I had three layers, interactive, blackout, and background, so when I pressed pause, the menu came up with the blackout behind. I also changed the alpha change to 0.6. Thanks!
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    You're welcome; glad it worked for you. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.