discoverthecurse's Forum Posts

  • I tried that and it let me click done but when I preview it changes it to "Bonus Chest:" and doesn't add the state. I am so lost.

    codah Im going to try implementing your system now. Thanks

  • > Is this something that the "append text" feature might solve?

    >

    Yeah, you can do that. Just append it, or this is probably neater and more functional...

    Create an instance variable called state

    And set instance variable to either "On"or "Off"

    And set text to "Bonus Chest: " & state

    I tried this and I am getting an error message:

    According to Scirra's Expression page my syntax seems to be right but I isn't working. I don't know what I am doing wrong. Any suggestions?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is this something that the "append text" feature might solve?

  • I hate to be a pain but it isn't letting me open them because i don't have the beta release r176

  • [attachment=0:3uii8eac][/attachment:3uii8eac]

    alright, this is the test capx i was experimenting these on. I have added 2 events so far to figure out how to get both of them going but as you can see when you click the difficulty one it changes the text to bonus chest. Ultimately what I am trying to do is have 2 buttons. A difficulty one that has 3 states (easy, normal, hard) and a bonus chest one that has 2 (on, off). I am obviously doing something wrong. I am probably going to change everything over to numeric variables but for some reason its only doing either button. not both.

    Thanks

  • It says that an "else is not valid there.

  • Really? I thought when it is set up like that it goes in line and checks to see which one is true at the time. What do you recommend? An "OR Block"?

  • I want to set up a similar toggle button system like the one used in Minecraft for difficulties and such. I have a "buttontext" family set up for the text on the button and set it to the same size and position as the button itself. Then I set up the following event system:

    When I click the button it doesn't do anything. Is there an easier (working) way to do this or is there something I'm doing wrong?

    Thanks in advance,

    LMillz

  • I mean I am pretty familiar with the program but I haven't really touched on functions and expressions yet. Kind of working on it on an '"as needed" basis. I'm planning on getting into it pretty soon. Just working on fine tuning some of the cosmetics of the game.

    I appreciate all the replies and help from everyone!

    LMillz

  • Can you explain that one a little better. I feel like I should follow you but at the moment I don't haha.

  • Wow. Simple fix

    Haha thanks. I don't know why I didn't think about that.

    LMillz

  • I (for the most part) figured out a decent workaround for the second question through the z order panel. As for the first question:

    I have a "button" family setup with my "btn1" object in it. I also have a family instance variable named "button". I clicked both instances of my object and set the first one's variable value to "play" and the second to "quit". I went into the event editor and tried setting up the following:

    Event

    Mouse-On left button click on [family] "button"

    Condition 1

    [family] "button" value = play

    Condition 1 Action

    Go to "game" layout

    Condition 2

    [family] "button" value = quit

    Condition 2 Action

    Close Browser

    As soon as I click DONE in the "Parameters for buttons: Compare instance value" dialog box I get an error that reads:

    "Unknown Expression 'play' (or 'quit')

    This is not a system expression or variable name in this scope"

    What am I doing wrong? I can't seem to figure it out. The instances clearly have the text values of "play" and "quit".

    Thanks in advance.

    LMillz

  • Thanks for the quick reply!

    Oh I think I get it now. So the instance mapping is done through the event sheet? When, in my game's system setup, do I (should I) set the instance variables?

    Also, in the actual editor: if i have btn1 sprite set to layer: "buttons", size: "100, 100" and position: "0, 0" and btn1 text set to the exact same size and position on the same layer, how do I select the sprite if it is behind the text without having to like move it out of the way temporarily if I want to edit the properties of that "btn1" sprite's instance

    Thanks again!

  • I have the "btn1" sprite object type linked to the "btn1" png image. I want 2 "btn1" instances on my main menu layout. 1 for play (click and it goes to the next layout) and 1 for quit (quit and it closes the browser). I already know what my events will be but what I am trying to figure out is how instance variables come into play. I have 2 instance number variables of the "btn1" sprite object. 1 is named play, the other is quit.

    tl;dr Am I supposed to link which instance goes with which instance variable? If so, how would i go about doing that.

    I just picked up Construct 2 yesterday and I don't know if Construct Classic had this functionality because I have never tried it.

    Thanks for any and all replies.

    LMillz