Can I create an overlay menu for my main game screen without pausing?

CluvCluv Member Posts: 229
edited April 2012 in Working with GS (Mac)
Hey!

I am working on an RTS, which is going quite well, but I am at the stage where I would like to create a menu to create actors in game. I figure I could create a set of actors in lieu of a menu that can be destroyed once the player decides what to create (or cancel), but I would think making a scene that can overlay in a corner would be more efficient. Any thoughts?

Thanks!
Charlie

Best Answers

  • xforcexforce Posts: 187
    Accepted Answer
    i have a few of these in one of my games so yes its possible. you can either do a full destroy when its not needed or just change its alpha to 0 and make sure theres an attribute that disables all the "links" that are connected to it
  • xforcexforce Posts: 187
    edited April 2012 Accepted Answer
    i wouldnt call it a "scene" overlay. just an overlay. the way ive done it is you basically just setup all your actors how you want and just have them all activate and appear when the correct attribute is set to True state.

    so lets say you have a weapon menu. just make it that in all your actors that are tied to that menu that they will only work when game.weaponmenu = true for example.

    so if its true they all appear and are all clickable and if its false they're either invisible or destroyed. and if they are only invisible make sure that their rules are disabled so you're not still accidentally activating them while you can't see them
  • simo103simo103 Posts: 1,331
    Accepted Answer
    @cluv you could also have the menu move in and out of the scene when needed which gives a cool look to the effect. I have a simple demo on the right side of this page: http://www.funkymunkygames.com/GameSalad/search/
    Titled: Pop-up Menu/drag and drop project. Note: the key with having numerous actors move in and out on a menu is to turn off moveable in physics (saves engine resources) and use interpolate to move them. Ease in and Out gives them a smooth motion.

Answers

  • CluvCluv Member Posts: 229
    xforce:

    Thanks for the quick response. So I can just overlay another scene and make it transparent when I am not using it. I like that. Nice.

    Now the noob question. Is there a particular function to set an overlay scene?
  • CluvCluv Member Posts: 229
    cool. so I should setup a boolean that controls whether or not the overlay appears and make sure that it can be turned on and off by whichever actors have access to that menu. I think I will most likely just destroy it because I am concerned I will probably forget to disable all the rules, but I guess it depends on how intricate the menu has to be... I will try it out and see what happens, and let you know.

    Thanks!
  • CluvCluv Member Posts: 229
    @sim103, cool. Thank you for the link. I will take a look today and see what I can do with it.
  • CluvCluv Member Posts: 229
    @simo103: my grammar and spelling have been atrocious for the last day; really tired. Thanks again. I tried out "P-Force." How long did that take you? And, how long did "Letter Lynx" take you as well?
  • simo103simo103 Member, PRO Posts: 1,331
    @Cluv ... forgot P-Force was out there ... I was just starting GS and my son threw ideas at me so I tried to learn a few things creating what he was saying, so it not anything more than a concept/rough start. That took about 12hrs I would guess ... only have time to do it an hour here and there. Letter Lynx: I first did tshirtbooths Boogle tutorial which I did in a weekend. I then worked again for an hour here and there over 3 weeks to do the additional features, create the graphics etc.
  • CluvCluv Member Posts: 229
    @Simo103: Very cool. I took the time yesterday to toy with the menus. Since my game is an rts with a "short" dev. tree, I am actually only half finished, but your demo was vital to getting the lion's share done. I ended up spawning all the menu buttons, but I ran into difficulties with some intricacies of what I wanted the menu to do once a button is pressed. So far so good though. Thanks again!
    C
Sign In or Register to comment.