lionz's Recent Forum Activity

  • You can save the array data in JSON format as one key. During the game update the array accordingly as levels are completed and save into local storage each time it's updated. When you launch the app you can load the array from local storage and check against it for level completion.

  • You mean to load save games from them? The tutorials are probably not outdated as nothing changed, you would use system save on a checkpoint and then system load to load the game from there.

  • Check that the variables are correct and true. Although that would be a strange tutorial that buries the movement animations in conditions like that.

  • Take global setting off the Flip object is the fix. He is following you through each layout including game over and the main menu and is falling off screen.

  • Are you able to share the file? Or more information?

  • Yes if it's predetermined data then you can create and fill out an 'array file' on the right side tool bar and then use the load action to load it into the array so you can read from it during runtime.

  • I really appreciate your time to show me how to create a functional array for inventory use.

    No problem! Array is the way!

    i got it to stop by only allowing the creation if the inventory slot is not overlapping an inventory item object

    That should work if it makes the condition false but be careful since the event is still running constantly. I would add it to the space bar press event myself to create them when inventory is opened and destroy them when inventory is closed, or are you hiding them?

    You will likely come across more bugs but if you understand the array all should be fine :) Maybe as practice you could add a description for each item that shows when you mouse over the inventory slots, descriptions stored in the array too!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can add it to the press space to open inventory event so it triggers once.

  • One way is to have invslot with single frame animations of all the items with matching names, add the variable for array location like I did with the text object in the example, then you can set invslot animation to array.at(self.ID)

    Another option is to create object by name and every time you open the inventory, for each invslot create the object for invslot.item on top of it. That could work well if you are using a drag and drop approach to swapping items. If you are using arrow keys to select them then I would go for the first option.

  • Ok I had some free time I made this quick one. You can see how it adds items to the array and stacks them, and also how you can remove them.

    dropbox.com/s/7s8b2gx1xq9xl4v/inv%20array.c3p

  • If you put the sprite and box in a 'container', whenever you create the box it will create a sprite with it, then they know and relate to each other. Instead of container you can use other methods like sprite is overlapping box then pin.

  • Use one event, on double tap. With sub event, animation frame = 0, Else animation frame = 1. Make sure you use the system else.

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