Inventory (table) issue - Need help

Hey sorry to bother you! I managed to make an inventory for my game but I have an issue.
When I press my item and add it to the inventory it works great.. all work fine etc and it even put the correct item in empty slot.

BUT when I click the item in the inventory, it change the slot attribute to image none and that is great but when I then later add an item again it cannot add to empty spots if an item is next to it.

Check picture.

the blue XX are items I "used" and when adding it adds to the blue XX but stops adding when it should add to the red XX spots.
What is the issue?

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @KIIVIIN the above looks ok, the issue is probably in the routine determining the next available slot. Could you post that?

  • KIIVIINKIIVIIN Member Posts: 159
    edited February 2016

    @Hopscotch said:
    @KIIVIIN the above looks ok, the issue is probably in the routine determining the next available slot. Could you post that?

    here is the slot rule for empty spots


  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2016

    Yeah that doesn't look like it's tracking what is empty where.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    I'll make a demo for you today.

  • KIIVIINKIIVIIN Member Posts: 159

    @Lost_Oasis_Games said:
    I'll make a demo for you today.

    Thank you!

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    I made some videos they are uploading now.

  • KIIVIINKIIVIIN Member Posts: 159

    @Lost_Oasis_Games said:
    I made some videos they are uploading now.

    thank you!!
    One question, If I use a timer to add +10 to an table integer row/collum. Is there a way to make it stop when it hits lets say 100? because when using "if table..." there is only options is, are not etc. I dont know how to make it "if table row/collum >100"

  • KIIVIINKIIVIIN Member Posts: 159

    @Lost_Oasis_Games said:
    I made some videos they are uploading now.

    Where can I find the videos? Checked the guru channel found nothing yet =)

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    @KIIVIIN said:

    @Lost_Oasis_Games said:
    I made some videos they are uploading now.

    thank you!!
    One question, If I use a timer to add +10 to an table integer row/collum. Is there a way to make it stop when it hits lets say 100? because when using "if table..." there is only options is, are not etc. I dont know how to make it "if table row/collum >100"

    You can do that by using the "numeric expression" in a rule.

  • KIIVIINKIIVIIN Member Posts: 159

    @NipaGames said:

    @KIIVIIN said:

    @Lost_Oasis_Games said:
    I made some videos they are uploading now.

    thank you!!
    One question, If I use a timer to add +10 to an table integer row/collum. Is there a way to make it stop when it hits lets say 100? because when using "if table..." there is only options is, are not etc. I dont know how to make it "if table row/collum >100"

    You can do that by using the "numeric expression" in a rule.

    I managed to make this by max/min =) thank you anyways!

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited February 2016

    @KIIVIIN
    here is a little project, it simplifies the process.

    Two rules and two behaviors to manage it all.

    Project is attached.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Final video is processing. Will be posting soon.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2016

    @Hopscotch said:
    @KIIVIIN
    here is a little project, it simplifies the process.

    Two rules and two behaviors to manage it all.

    Project is attached.

    I used a loop for the table search but I see you used table search. Nice touch! I didn't use any Spawning and mine only needs one numeric value to define an item across the code.

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited February 2016

    @Lost_Oasis_Games thanks, yep, the tableSearch function is often overlooked, yet it is very powerful and fast since it scans the whole table in one draw frame.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @Hopscotch said:
    @Lost_Oasis_Games thanks, yep, the tableSearch function is often overlooked, yet it is very powerful and fast since it scans the whole table in one draw frame.

    Yes that didn't even occur to me..lol

  • ArmellineArmelline Member, PRO Posts: 5,415

    @Hopscotch said:
    @Lost_Oasis_Games thanks, yep, the tableSearch function is often overlooked, yet it is very powerful and fast since it scans the whole table in one draw frame.

    tableSearch is amazing! Especially since you can use a tableSearch within a tableSearch!

Sign In or Register to comment.