Kajshi

Registered Users
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Kajshi

  • Rank
    Junior Member
  1. Hello. I can't find any info about how to set variable amount of items. My mod (only own use) base on Auto Planting In contradistinction to "Auto planting" my mod don't planting items at offset algorithm, but return so much new items as much as I put to container. And there is in "Auto planting"-mod such code: if inst.components.container:Has("dug_sapling", 1) then inst.components.container:ConsumeByName("dug_sapling", 1) inst.plants = "sapling" GLOBAL.ThePlayer.components.inventory:ConsumeByName("nightmarefuel", amount) end Instead number (there it is 1), I want use variable amount "n", which I will set as "local n = I don't know what code to use here". I tried to use "local n = self.obj.components.stackable:StackSize()", but it don't work. And so here is my question: how to set variable amount of items, that based on the amount of items that I'm going to put in the container. I don't want to set a fixed amount of items, because with each use, amount of items will be different, depending on how many I want use. Sorry for my bad english. It's not my native language.