Announcement

Collapse
No announcement yet.

Remove Items From An Array

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Remove Items From An Array

    Ive got this basic inventory and crafting setup that someone did a tutorial for on the net. I followed it exactly as the video showed. However as with all tutorials as i finished, it wasnt working as described. Ive fixed all of it apart from when the item is crafted it should take the items out of the inventory. It now doesnt for some reason, Just wondering if anyone can see the problem and point me in the right direction.

    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	341.5 KB
ID:	1170355

    Thanks, if you need to see more blueprints just ask and ill upload them

    I believe the problem may lye within this blueprint below.

    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	282.9 KB
ID:	1170366
    Last edited by viggerz; 01-16-2016, 05:07 PM.

    #2
    Item to Remove does not have any effect on which item is removed, just how many times the loop occurs. What you have setup is that you loop through every item, and attempt to remove it if the class matches. If a class does match, you are breaking out of the loop. I am trying to figure out exactly what you want this function to do, as I am slightly confused.

    I would like to point out though that your function is never getting past the first loop, as the last index is 0, while the first index is 1. I suggest you remove the first loop, and see if that works.
    Marketplace Assets

    Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
    Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
    Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

    Comment


      #3
      I think they guy said on the tutorial the reason he put the integer to 1 is because if the item value = 0 there is no item to take away and taking the item out of the inventory would put it in the minus. Although getting my head round this is a real headache.

      I deleted it and nothing has changed i can still craft unlimited things. I will delete it and see if i can add more with it.

      Comment


        #4
        I think what he was trying to do was see howmany resources are in the index and take away a certain amount after item has been crafted, but he wanted to do this without bringing the number into the minus, so the bottom number will be 0 where nothing is in the inventory.

        Comment

        Working...
        X