Felix Mochizuki's Forum Posts

  • Can't you just use the "Push" function in the Array object? That pushes a value to the 0 index of the array.

    Also, what is "Array" is that you item list, or is that your inventory?

    i don't know how to use the Push, how would it work?

    and the "Array" is the array of the player inventory, it's an 5x5 array so it creates 25 item slots for the player to store his itens

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, take a printscreen of you events and place here, I can't figure out what you're doing wrong.

    I think i've managed to explain everything right, follow the order of the screenshots:

    1) prnt.sc/dg3dmn

    2) prnt.sc/dg3e32

    3) prnt.sc/dg3e97

    4) prnt.sc/dg3ef3

  • try using "once while true" conditional.

    i tried that and it didn't work too, i guess that "runs once" means that he will fill the entire array only 1 time, oh god...

  • so your item Id for potion is 1... continue...

    I want suggest you to use an invisible tilemap and check if the object is at a specific tile position, if so, improve the player with its stats.

    To know the tileposition, you can check the positiontotileX and Y of the tilemap

    The only problem i'm having is to store an item only in the first empty slot instead of all the empty inventory slots, what i wanted to do is if the player clicks on an equipped item the code would remove this piece from the equipment slots and store it in only the FIRST empty slot available of the inventory, the way that i tried to do is checking the array XY but it doesn't change the value (to store the item) of only the first empty slot but ALL the slots, i don't know how to fix it i'm using the array in a wrong way.

  • Do your items have unique IDs?

    no, i just created an array to create some "Slots", "Slot" is a sprite that i've created so he has all the animations (for example if the value is 1 then the slot animation will be a potion, etc)

  • hello, first of all english isn't my first language so i'm sorry if i write anything wrong, so...

    i'm creating a rpg game, i've created an array for storing the player itens (the game has an inventory of course) but i'm having a lot of difficulties manipulating the array, here's what i want to do:

    • if the player clicks the chest slot, and the chest slot already has a chestplate equipped, then the code would look for the first empty array space to store the chestplate in (so that would be an Unequip system) but i can't figure out how to do that, the way i tried to do actually replaces all the empty inventory slots to the chestplate instead of only the first one available, would love some help since i really don't know what to do.