Variable Inventory

Discussion in 'Development' started by b3st_Thunder78, Jul 4, 2019.

  1. b3st_Thunder78

    b3st_Thunder78 Spider Jockey

    Messages:
    38
    Hello,
    How can I save the individual inventory slots as string / variables? So that for example the first inventory slot in the hotbar (0) can one store into the variable $ one for example? Is that possible?
    Thank you
     
  2. StevenS

    StevenS Spider

    Messages:
    8
    $one = $p->getInventory()->
    hmmm. im stuck. looking at the docs but i dont see any getslot() function unfortunately. I dont think its possible
     
    Muqsit and b3st_Thunder78 like this.
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,558
    GitHub:
    muqsit
    ->getItem(0); // slot = 0
     
  4. b3st_Thunder78

    b3st_Thunder78 Spider Jockey

    Messages:
    38

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.