lionz's Recent Forum Activity

  • I mean initially in the first post you didn't provide the important load events. I can see now you're loading things from ajax on start of layout while at the same time running a function on start of layout before the data has loaded. But also I mentioned this method is unnecessary, you shouldn't be saving and loading to local storage between layouts to add items to an inventory.

  • It's no use talking about events that we can't see, you should provide all important events. So it's resolved now then, not everything is loading for you.

  • What are you loading with ajax? Maybe it's not finished. Also you are getting the dictionary item within the function which may take time and it could be blank or 0. I suggested getting the dictionary item before you call the function then call it with the dict item as a parameter.

  • What is broken?

  • What I mean about the logic is that it only shows you searching for an empty slot and adding one item to the inventory on start of layout. It sounds like you are storing items to later add to an array, why not add to the array at the moment they are picked up?

    There would only be one global var to store an item as you pick it up, but once you have verified it is working you wouldn't even need that. With the function, if you are making an add item function, you can send the item name through the function as a parameter. Read up on functions if you don't know about this.

    What you've done here is combine looking for the empty row and adding the item into one function which is fine but I don't understand the use of dictionaries and list of items.

    I would advise using debugging with the Browser object, you can log things to the console to check how the function is working.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you paste in, sometimes the origin point shifts. It can be in a different location in each individual frame. Check that it is in the appropriate place in the centre of the sprite's image for each frame, is the first thing I would check.

  • What is the uncommon herb medicine code you mention, you didn't share this? This looks a bit convoluted for adding an item to an array, do you definitely need to use dictionaries?

    You could store an item as a global variable string and use that to add in the array. You can run a basic 'for' loop from 0 to array.width to find the next empty X and store that somewhere to make sure it's working and finding the correct row.

    Once that is confirmed you can then try adding the item to that row and confirm that is working. Also since you are using a function, you could find the dictionary item required outside of the function and pass it through the function as a parameter to also check it.

  • To pick the family in this case then the behaviour needs to be at the family level. You should still be able to pick each object individually, the family is there to manage it into one event but you need to have a family behaviour added.

  • You can check if object.count = 0, that means none exist.

  • The picking looks correct so maybe all the microphones are set to 'ice', check this in debug mode during run time.

  • Saving and loading instance variables between layouts is not really standard practice, you should use global variables or a global player object.

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 73 followers

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

24/44
How to earn trophies