lionz's Recent Forum Activity

  • Here is a screenshot of what I mean

  • Well again it needs to be much simpler than what you have, you don't need so many loops and you don't need variables to track next available x and y. Also be careful using loopindex("x") as the x is for the name of the loop which you don't have.

    You need a simple system 'for' loop, for from 0 to array.width. This runs down all the rows. Then with this the condition array.at(loopindex,0) = 0. Then on the right side actions, you have Stop loop, and set the other columns to what you want so for example set array.at(loopindex,1) to an item name, array.at(loopindex,2) to an item description.

    So yeah that's all you need to set up what you want I dunno how I can make it clearer than this :D

    Also you never posted what the array looks like but make sure the empty slots are actually 0 and not just lacking any value so it would be "" instead of 0 if that's the case.

  • Lets see the new events?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use a variable for total number of mines and compare it to number of Cells where text = []. That means you've won I think, if there are x mines and you have x cells of text [].

  • I don't have a sub right now and I'd need one to assist again on this but basically what you are looking at is the 'canCraft' section which for the moment only checks if the item is in the array. You'll need to add a quantity column to your recipe on column 2 where 0 is the item and 1 is the first ingredient add the quantity required on your sheet. Then on 'for each craftingicon' you'll need to check as well as item1 appearing in the inventory that you also have enough quantity in your inventory required for the recipe. You'll need to grab the index of the item in your inventory to check the quantity against the recipe quantity value.

  • 1. You can enable/disable it in the create event or use the condition 'on created'

    2. You can use one event sheet and right click > 'include' that event sheet in other ones to avoid repeating the events.

  • 'for each array' is not looping through the array, this is to pick each instance of invarray of which you have 1 so it is not useful here. You are probably looking for 'for each element' which is a loop on the array object, but the system one I mentioned can also work well. You were never looping the array that's why all your objects are set to 0 position.

    "Or I'm just overthrowing this at this point and should just delete the 6 lines of code and start over with a simply system or a suggested replacement??"

    - Yes, keep it simple like I described above. You were never looping the array so first do this and see where your game is at, then you can come with questions from there when you are able to pick up an item and add it to the next empty slot.

  • Just create a system loop for 0 to array.width, then a sub condition system compare 2 values if array.at(loopindex,0) = 0 (is empty), then stop loop and add the item there with actions.

  • You didn't mention what the incorrect outcome was but I think I see a problem that I also came across. So in the array sheets the rows are actually Y and the columns are X, so the reverse of the array. In the sheet you have to put the data in rows as columns and columns as rows. When you look at your array in debug view, the data will not be what you expect where columns are at X and rows are at Y, I think ?

  • You'll need variables on the invslot for type and also on items for type. Then it is just a case of adding more conditions to your drop event. I would probably split them out by type so they don't become convoluted so one event is for weapon item on dropped so this only handles weapons : on items dropped (items.type=weap), sub events if invslot.type=weap and is not full then drop it, Else if invslot.type not equal weap or is full, then send it back. Then you can create a different event for drop items if item.type=armour etc

  • can you show us what the array looks like in debug view runtime? thanks

  • Create the sprite first then open the image editor and you can import the images as animation frames of that object

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 79 followers

Trophy Case

  • 12-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

25/44
How to earn trophies