lionz's Forum Posts

  • The main problem you'll have here is itemicon doesn't relate to any item. You do check for it in a condition as values 1 and 2 under recipes but you don't store them. You'll need to access recipe 1 and 2 again in the action to replace itemicon. If you store some of the data in local variables it might be easier to work with.

    If you need more help you can send the file but please leave two items near the player that they need and an idea of what is being crafted.

  • I'm not familiar with the game but if it is going to be hundreds of scenes you could try to combine them several into one layout just because it might become difficult to handle with so many layouts. Also if the game is made up of only few graphics you shouldn't be concerned about performance issues anyway.

  • Ah yeah sorry. on the Contains value itemname comparison in HUD change the value ItemPosition.IndexOf(ItemName) + Quantity to ItemPosition.At(ItemPosition.IndexOf(ItemName),2) + Quantity.

    I think that auto fixes the other problem too ?

  • The opposite actually as it only loads what is in the current layout. Putting everything in a single layout is where you would have the performance issues, though I believe there is something where you can unload graphics that are not being used if you prefer to do it that way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you mean a patrolling enemy that changes direction when it reaches the platform edge? You can put invisible sprites at the end of the platform, when it touches one of them toggle a boolean that relates to simulating left/right on the enemy platform behaviour.

  • When asking for help please mention the actual problem you are having

  • Yeah that's the best idea unless it makes more sense to change the background in the same layout and spawn objects based on stored co-ordinates.

  • You should be able to use indexof "0" since you used that for empty slots, so at the top of the add item function set cur slot ID to array.indexof("0"). If you have a problem you can send the file again.

  • I would expect that to work for the next new item, I guess it breaks for the one after that because it could overwrite the next. If you do the above in my recent post for calculating cur slot ID then it should all come together, there will be no need to set slot ID when you delete the item or add 1 to it, it will just go to the first empty slot each time (assuming that is how you want it in the game)

  • I was saying that when I pick up an item, it was added to the empty slot, but when I pick up a different item, it doesn't appear on the next empty slot.

    That was working in the file I shared though right ?

  • I can imagine a problem but it doesn't sound like what you described. Because you are always adding 1 to the slot ID and then using this as the next empty one then deleting items in the middle won't work so I can see that you need to rework the empty slot ID logic but you said the problem is its always added on the slot of the deleted item ? So is that what you meant that it doesn't find the new empty slot ?

    To rework that logic to find the empty one you can rather than add 1 to curslotID, add an event to set curslotID to the first column that has 0 amount... so for each x if no item name at curx,0 then set that x to the curslotID. You can add this to top of the function before the other checks.

  • Better with a global variable. The local won't retain it's value so it's going to revert to false.