Kuln's Recent Forum Activity

  • Thanks for help, guys! It'll take me a bit to wrap my brain around the info.

  • Do only sandwiches that are in the inventory exist, or are there sandwiches existing that are not yet in the inventory?

    Only sandwiches in the inventory exist. The components of the sandwiches are selected by users, with the selected components committed to the "inventory" as "a sandwich." (technically, there is no unified sandwich, just a bunch of committed variables which go in the next unfilled slot of the inventory screen, which is a table.)

    So it looks more like:

    Slot 1 (occupied) - Bologna - Am. Cheese - Peppers - Mustard - Sell (enabled)

    Slot 2 (empty) - "" - "" - "" - "" - Sell (disabled)

    Slot 3 (empty) - "" - "" - "" - "" - Sell (disabled)

    Slot 4 (empty) - "" - "" - "" - "" - Sell (disabled)

    Slot 5 (occupied) - Mustard - Lettuce - Bacon - Mayo - Sell (enabled)

    ETA: So I don't come off as a complete asshole, I tried what I thought up in OP and it didn't work.

    ETA2: -And I think I responded to your question incorrectly. "Pre-made" sandwiches don't already exist, but they can come into existence. Gosh, this is a pretty high-level conversation about sandwiches...

  • Sorry for confusing thread title. :/

    I have an event where one randomly-chosen sandwich from an inventory pool of five must be burned, but a user does not have to have all sandwiches in his inventory. Therefor, I need to check to make sure the sandwich exists to be burned before I actually burn it.

    What I'm trying to do:

    IF "event triggers," THEN set BurnedSandwich to floor(random(1,6))

    IF BurnOneSandwich=1 AND ("SandwichSlot"&BurnedSandwich&"Filled") = 1

    THEN "set BurnOneSandwich to 0, burn the sandwich, tell the user which sandwich burned, yadayadayada."

    ELSE Set BurnedSandwich to floor(random(1,6))

    Can I actually use ("SandwichSlot"&BurnedSandwich&"Filled") or is there some other way of keeping this simple and in one event?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • .... lol. Okay, I see. "Button clicked" doesn't get reset just because one event used it as a condition and fired. I'll go stand in a corner, now.

  • Hello! I'm working on an inventory layout, and the basics of what I've made in the events sheet are:

    Ev1

    If:

    button clicked

    AND

    variable Slot One = 0

    Then:

    set variable Slot One to 1

    laundry list of stuff

    Ev2

    If:

    button clicked

    AND

    variable Slot Two = 0

    Then:

    set variable Slot Two to 1

    laundry list of stuff

    etc. for five slots + another event, where if variables Slot One through Slot Five are all 1, it'll throw an error. I'm expecting someone to click "the button," have Slot One filled (since events run from top to bottom, where it'd fire the first one it sees), and then if they click "the button" again, Slot Two will be filled, etc. to Slot Five. What's happening is all slots are simultaneously filled when someone clicks "the button," like it's checking all the events first, then firing all where conditions were met. Am I missing something?

    Any help appreciated.

Kuln's avatar

Kuln

Member since 23 Aug, 2014

None one is following Kuln yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies