It is incredibly vain to do something like this...

This forum is currently in read-only mode.
  • But since I had made quite some progress with my pause menu so far, I thought I'd show people my progress thus far. ^^ Most noticibly, the "Coloring" option took all day today to finally get down, and the little window that opens up from the side I did last night, and just today I got around to trying to figure out how to get the coloring customizations to work, with a lot of copying and pasting.

    But a lot of the other stuff I did took quite a bit of effort and work too, like the inventory that fills in items in order of which you got them, and when you empty out the stock of a certain item, you can refill that spot with something else. ^_^;

    http://www.megaupload.com/?d=SIZCVOG4

  • That's a nice menu example. Care to share how you did it? We get questions about menus and inventory all the time.

  • id download it if it werent on megashitload

  • What do I do? Neither P nor the Pause key pause the game. Which bit are you talking about?

  • Press enter lolol.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ooooohhh yeeeeaaah.

    Enter = Pause

    Z = Run/Cancel

    X = Jump/Accept

    It's very NES-ish by design.

    [quote:25pjppyf]Care to share how you did it? We get questions about menus and inventory all the time

    I'd post my .cap, but I doubt it's organized and commented enough for anyone to understand what I was doing, even though I HAD clarified what events were doing what just so I'd have some "signposts" of where I was in the sea of events used for that pause menu. Since I don't have anywhere NEAR the skill you or anyone else like Ashley has, I sorta winged it and threw it together.

    Some things here are pretty simple. For one, there's a "Selector" object that has a "Selection" variable. When Up is pressed, decrease "Selection" by one. When Down, increase by one. If "Selection" = 0, set position to "SQUSIHYoption".X, .Y. If = 1, set position to "WEAPONoption".X, .Y.

    Selector: Selector:  Value 'ExpandedMenu' Equal to 0
    
    Selector: Selector:  Value 'Selection' Equal to 0
    

    SelectorSet position to SQUISHYoption 0 .X, SQUISHYoption 1 .Y

    Selector: Selector: Value 'Selection' Equal to 1

    SelectorSet Y to WEAPONoption 0 .Y

    [/code:25pjppyf]

    Then, if "Jump" is pressed, our "A button", then that sets "ExpandedMenu" to 1, so we're not accidently messing aruond with the main menu, and enables group "Squishy Select" and has its own similar set of rules on how the cursor moves, where the cursor is depending on the "Selection" value, which is shared for almost every single seperate thing, and whatever.

    There's some events that are ordered to move down in the "Squishy Select" event group, depending on who they are. For example, in the character selection there, our bottom-most option, "QUIToption" is ordered to set its Y position to its Y position -16 if its Y position is less than 352.

    Or to put more simply, if its higher than we want it to be, it shoves itself downward to make room for the character selection. This has no effect on the OTHER options, though.

    All options whose X = 48, that is, any text options that are in the "main menu" alignment, and no others, and whose Y is greater than 32, which is ANY option below the "Squishy" text, but whose Y is less than "QUIToption"'s Y, which is to say, still above the "Quit" option, shoves themselves downward with the command of "Options: Set Y to OptionsY+16".

    And to put THIS more simply, it selects all the options that are in-between "Squishy" and "Quit" and pushes them downward only so far as where the "Quit" option is. The "Quit" option just moves down as far as we need to have enough space to present the characters, leading the OTHER options to follow. The specification of the "X = 48" thing means we only drag down the "main menu" options with it, otherwise EVERY little option behind the scenes would be pulled out of whack.

    There's a lot of copying and pasting with that little thing to present the space we need for whatever options I wanna throw in there. Then we enable a group event to handle the other stuff.

    For example, with the "Options" group event, we still have the "Quit" option move on down, leading the other options with him. At the same time, all the other options for "Options" come in from behind the scenes to their designated position.

    System: Always (every tick)
    [/code:25pjppyf]
    
    Under this, in a sub-event...
    
    [code:25pjppyf]TextSpeed: TextSpeed:  X Less than 80
    

    TextSpeedSet X to TextSpeed 0 .X+64[/code:25pjppyf]

    That above tells the "Text Speed", if it's NOT in its designated position, which it won't be to begin with, to move into place. It moves in from the left side of the screen, from which it hides. During the "Options" event group, it yells at "Text Speed" to start moving to the right if its X position is too far to the left.

    And below, in another sub-event for THAT, we create some insurance.

    TextSpeed: TextSpeed:  X Greater than 80
    

    TextSpeedSet X to 80

    [/code:25pjppyf]

    This is in case "Text Speed" trips past its cue. If it goes BEYOND its designated position, we forcefully shove that thing where we want it to. It happens so instantly that I've never really noticed it.

    We can keep experimenting with this further on, having designated positions for every single little option, telling it to run into its place when its Event Group is enabled, and when disabled, I have a master, "Go Home Menu Items!" Event Group that tells EVERY single piece of text to go running back to the edges of the screen, and it's always enabled, but all the Event Groups below it can overtake whatever options it needs.

    As for making it functional, I've had it boiled down to a few private variables in our "Selector" object:

      Repeating Selection ExpandedMenu Sub-Selection X Selection Y Selection

    You saw how "Selection" and "ExpandedMenu" worked before.

    In the case of opening up "Options" in our pause menu...

    MouseKeyboard: On "Jump" pressed
    Selector: Selector:  Value 'ExpandedMenu' Equal to 0
    Selector: Selector:  Value 'Selection' Equal to 5
    System: Timer is Greater than 10
    

    SelectorSet 'ExpandedMenu' to 5

    SelectorSet 'Selection' to 0

    SystemEnable group "Options"

    XAudio2Play music "button-11.wav"

    [/code:25pjppyf]

    And with "Selection" set to 0 with "Options" Event Group enabled, the Selector object highlights our first option, "Text Speed". If = 1, its position hovers over "Music Volume" and so on.

    Then, if "Text Speed" is chosen...

    Selector: 28 Selector:  Value 'Selection' Equal to 0
    

    SelectorSet position to 80, 224

    [/code:25pjppyf]

    Enter sub-event...

    MouseKeyboard: 27 On "Jump" pressed
    TextSpeed: 127 TextSpeed:  Y Equal to 224
    TextSpeed: 127 TextSpeed:  X Equal to 80
    MusicVolume: 126 MusicVolume:  Y Equal to 256
    MusicVolume: 126 MusicVolume:  X Equal to 80
    SoundVolume: 137 SoundVolume:  Y Equal to 288
    SoundVolume: 137 SoundVolume:  X Equal to 80
    ScreenMode: 135 ScreenMode:  Y Equal to 320
    ScreenMode: 135 ScreenMode:  X Equal to 80
    Coloring: 145 Coloring:  Y Equal to 352
    Coloring: 145 Coloring:  X Equal to 80
    

    SystemEnable group "Text Speed"

    SystemDisable group "Main Menu Selection Values"

    SystemDisable group "Options"

    XAudio2Play music "button-11.wav"[/code:25pjppyf]

    First, let me explain that I've set it up so that ONLY if all the "Options" selections have assembled together, into their proper places, can you choose a selection. I did this because otherwise, some glitchy stuff happens if you try picking options and stuff before they're in their positions.

    Secondly, we enable ANOTHER Event Group, "Text Speed" to handle the display and picking of options for that, and at the same time... disable the "Options" event group. Why? So that we're not accidently messing around with anything in the "Options" stuff.

    And we disable "Main Menu Selection Values", which is an event that handles the variables of "Selection", but only when "Up" and "Down" are pressed. This can be universal for the main menu AND "Options". How? Well, "Up" adds 1 to "Selection", "Down" subtracts 1. We don't have to alter this between the main menu and "Options" since we can STILL tell the Selector where to go depending on the "Selection" variable's value. "Text Speed" is a different story, and requires its OWN set of rules to allow for "Left" and "Right" to make selections, since it's unique in that aspect. If we let "Main Menu Selection Values" handle this, we'd need to push "Up" and "Down" to move the cursor left and right from "Slow" to "Fast".

    There's a lot of other stuff, but like I said, I'm not as imaginative or clever as others on this board, so the .cap is a pretty big mess. It's like if I introduced you into my messy house with things scattered all over the floor and was like, "Watch where you step." Not only that, but Construct actually crashes if you try opening the "Pause Menu"'s layout directly. You have to open up another experimental stage layout FIRST.

    I kinda wish there was a way to make the coding more efficient, but I'm not sure how. This was pretty much the best I could do at the time of making this. When it comes down to programming in Construct, from some examples I've seen, like with Deadeye's tutorials, it's not so much a matter of skill and know-how, it's puzzle-solving and imagination. There were lots of things in some .caps I've downloaded from people here that did some cool stuff with VERY few events that were easily understood, it was just a matter of thinking of them, a matter of coming up with those ideas. The imagination to THINK of those sorts of simple work-arounds, and I always found myself saying to myself, "I wish I could've thought of that!" Things that I KNEW how they worked, I just never would've had the creativity to use them in such a way.

    And that's what's what bugged me about the topic about "Tileset RPGs" in the Help Forum. If you just sit down and think of a way to do it, put forth a bit of imagination, you could EASILY create something like that. My whole pause menu is DEPENDANT on 16x16 tiles, especially in appearance. The border for the pause menu was made in Photoshop, creating 16x16 tiles that I stretched out and placed accordingly.

    This was pretty long-winded, and I barely explained how anything worked, and just a few things about my thoughts. It would be much harder to explain in more specific detail HOW everything works, and I doubt looking at my .cap would be any more helpful, but I hope what I've explained gives SOME idea on how I did this. ^^

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)