Zzarkz's Forum Posts

  • 8 posts
  • Keyboard Item Menu — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/keyboard-item-menu-4079

    <p>This product is an Item Menu where you can select your items, equip them and also access your options menu. </p><p>All via your keyboard!</p><h3>Contains</h3><div class="deshr"></div>

    • Items, Options and Exit buttons
    • 8 Items that can be equipped
    • 4 Display items
    • Options page
    • Detailed code description

    <h3>Note</h3><div class="deshr"></div><p>Does not need 3rd party addons</p>

    Use this topic to leave comments, ask questions and talk about Keyboard Item Menu

  • I am curious, how did you create it? did you make it into a state engine (ex. Default Var is X, IF x, then y, IF xy, then yx)?

    Default Var = 0

    set [option1] highlight when Global Var = 0

    set [option2] highlight when Global Var = 1

    set [option3] highlight when Global Var = 2

    if [option1] is highlight and you press -> , add 1 to Global Var

    if [option2] is highlight and you press <- , subtract 1 from Global Var

    When you close the menu, set Global Var to 0

  • Could you share your code?

    Are you using "On key pressed" events or "Is key down"?

    "On" events are triggered once.

    "Is" events are triggered many times a second, which could cause that problem of yours.

    Thanks for taking your time, I solved it like 15 minutes ago.

    My previous code was something like (When menu opens, highlight [option1])

    (If [option1] is highlight and -> is pressed, turn [option1] off and check if [option2] is visible and highlight it. If [option2] is not visible, highlight [option3] if visible. If not, highlight [option4]

    Now I created a numeric global variable and it works.

    Its something like (if GlobalVar = 1, highlight [option1])

    On -> pressed, add 1 to global variable if [option2] is visible, etc, etc.

    -Hope anyone with the same problem benefits from this Post-

  • I'm working on a menu that works using the keyboard.

    For example [Option1] - [Option2] - [Option3] - [Option4]

    (When [Option1] is highlighted, you press -> and [Options2&3] aren't visible, jump to [Option4])

    My problem is that, when [Options2&3] are visible. When I press -> It works so fast that the [Options2&3] dont even highlight and jumps directly to [Option4].

    I know it works because if I remove [Option4] it jumps to [Option3], and if [Options3&4] are removed, [Options1&2] move perfect

    -Thanks for your help and time-

  • Worked with an Else condition!

  • So, I'm working on a keyboard controlled menu for my platformer game.

    My first 3 tabs are "Items" "Options" "Exit"

    And my problem is when I Open the "Items" menu.

    The way the menu works is by sprites that change animation depending on what key you pressed. (To get into the "Items" Tab you need to press "Z")

    My problem is that when I press "Z" and open the Items Menu, it automatically deactivates the first item highlighted.

    The way I activate/deactivate "Items" is by pressing "Z" as well, when the item is highlighted. Using a dictionary to assign keys to items when "active = 1".

    This means when I press "Z" on the "Items" tab, the item Key turns to 0 automatically

    -Thanks for your time, I really appreciate it-

  • Done with a variable, you pick the item and you set the variable on the player or globally, i.e. blue=1, red=2, green=3.

    Then its Player_Base - Platform is moving

    condition: if variable=1 play animation bluesuit_run, if variable=2 play animation redsuit_run etc

    Awesome, thanks man

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello

    I'm currently making a platformer game and one of its features is that, when you pick up an specific item your costume changes of color.

    Right now my animations are being called by, IE: Player_Base - [Platform is moving] \ Player_Mask - [set animation to: "Run_" & Player_Mask.aimDirection]

    My animation name in this case would be (Run_"aiming direction")

    Now I'm thinking of renaming my animations to (BlueSuit_Run_"aiming direction") , (RedSuit_Run_"aiming direction") , (GreenSuit_Run_"aiming direction")

    But I dont know how to call the animations for those specific set of names

    Thanks id advance

  • 8 posts