How do I fix my Inventory Problem

  • Could you clarify the first part a bit more? I git confused somehow. Could also be because its late and I'm tired lolz, and thanks for the other bit. I didn't have the origins set right :/

  • Could you clarify the first part a bit more? I git confused somehow. Could also be because its late and I'm tired lolz, and thanks for the other bit. I didn't have the origins set right :/

    Best tip is to walk away from your project for a while (i.e. get some sleep) and look at it with fresh eyes. I usually spot a hard to find bug in a few minutes that way

  • Start by making an array, Toolnames.

    In System -> On Start of Layout

    Toolnames -> Push Back "Hoe" on X axis

    Toolnames -> Push Back "Shovel" on X axis

    ... "Hammer", etc,

    You then have an array full of tool names.

    Then in Toolstuff, you just need one Condition, instead of one for each tool:

    Objects -> ItemGroup = "Tools"

    But the action is,

    Objects -> Set Itemframe to Objects.AnimationFrame

    Objects -> Set Itemname to Toolnames.Objects.AnimationFrame

    In both cases, Objects.AnimationFrame will be treated by Construct 2 as just a number.

    So if the animationFrame was 2, it will set the ItemFrame to 2, and the Itemname to Toolnames object 2- which would be your hammer!

  • "Objects -> Set Itemname to Toolnames.Objects.AnimationFrame" this part is not working for some reason :/ Says "Objects is not a behavior in Toolnames"

  • Sorry, that should be Toolnames.At(Objects.AnimationFrame) I think

  • Unnatural20 That worked. But am I suppose to be removing something? Far as my array stuff my old stuff.

    Edit: Ok disabled some things pertaining to that, and now nothing is displaying right :/

    Edit2: Do you have a .capx with what ur talking about? Cuz I can't get it to work :/

  • Bump

  • Can you upload your current .capx?

  • Ok also keep in mind here something happened to the .capx (Some files went missing or something) At least thats what it said. But it doesn't pertain to my other problem.

    Edit: Just realized thats the .capx that crashed and didn't have those changes that was implemented. (The frame fix, and origin fix)

  • Find anything?

  • I'm not seeing your problem? Once I re-implemented the frame fix and origin fix, things seem to work pretty well.

  • Ok apparently I did something else in another proj that was a copy, and messed it up :/. Any Idea how I can go on to make this even simpler? codah mentioned something about using one object for everything rather than 2.

  • I just wondered why you needed 2 identical sprite objects if they are indeed identical. Just seems like extra work and bug prone, as you've seen. Just have a 'flag' instance variable that says 'i'm being used in the inventory' or not. Only thing is you have to check that variable every time you pick that sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • codah Being a noob. Sometimes I need it explained a little more. Sorta like a mini tutorial. Sorry for being such a pain. But U make it sound easy, only I'm not getting it. This time I'm wide awake lolz

  • That last capx doesn't load for me... missing animation?

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