lionz's Forum Posts

  • Yeah it is probably any product IDs, but you could've tested this in the sandbox environment before pushing it live. I would stick to the specific product ID, making it any purchase because you have only one product has caused some bugs. There's also no way to revert it because I don't think you can track who genuinely has the local storage flag set since both events triggered it.

  • Are you on android? Either way the workaround is how you should've done this originally, not sure on that first bit of logic, unlock the full version on any purchase, that was your design?

  • Every 1 second add 1 to the global variable. When global variable is 60 - game over.

  • maybe that variable isn't 0 ?

  • That would be a nice addition!

  • I therefore use the "stop" function followed by the "City" tag. However, the sound does not stop.

    When do you use it? Share a screenshot

  • You can use for each element for each X as an option, or you can use a system for loop from 0 to n where the data 'loopindex' can be the current X or the current Y. So if you have 5 rows and run for 0 to array.width, it will run 5 times and each time you have the loopindex of 0,1,2,3,4 to refer to each row.

    I would definitely take the item references from a global variable as there's really no need. You can use global var for the amount like numWood numStone collected for the player. The way you will design the crafting events is kind of based on how it works in the game, you can just throw any items into a place and hope it makes something seems a little wild for the player.

    Maybe for the crafting it's easier in the end to use a sprite with instance variables which are named by item name and the value is the number dropped in. It really depends how this crafting would work, I can't imagine it as a player.

  • There's a lot going on here, I'm not sure how the ingredients are listed, i thought you said its crafting from 2 item types. Also I wouldn't use IDs for items theres no need, should be strings for the item names and numbers for the amount required. In general you move through the array by using the array object and for each X to check each recipe, but within this you need to check certain Y (columns) to see if it's matching.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Fill out an array file, under Files. Use AJAX to request the file. On AJAX completed, load lfrom JSON ajax.lastdata.

  • Each recipe is a row of one array, like a spreadsheet. When you craft, this is a separate array to compare back to the recipe one.

  • So there is an array object, and you can load the array files in or sure import as JSON too. The idea is the recipes are listed in the array in whatever format you want so something like :

    item 1 | amount 1 | item 2 | amount 2 | makes what

    Then the crafting area relates to a separate array with the same structure, as you drop in items into slot 1, the item 1 and amount 1 updates, as you drop items into slot 2, the item 2 and amount 2 update.

    When you click on 'craft', you compare this array with the recipe array to see if anything matches.

    So if you drop in 2 wood and 2 stone, it would then look in the recipe array for

    wood | 2 | stone | 2

    and then this makes the item at column 5

    Something like this would be my approach

  • Create an array of recipes and compare against them when you try and craft. Recipe would contain 2 items and the amount required so can look something like 2 | Wood | 4 | Stone, then when you drop the items in you compare to a craft array which has the current items and amounts dropped in, in a similar structure. I think global variables are only useful for total item amounts that you would display in a HUD UI.

  • Should be, dunno how you broke it

  • I mean use the event 'player on collision with tilemap'

  • Player on collision with tilemap?