How to use a dynamic item value?
Posted: Sat May 12, 2018 5:37 pm
I need to read the current number of things in the inventory and use it in my code.
An example is this:
In the player's inventory, a stack of 28 items.
I will call it this:
And I need to do the following in code:
The value is dynamic, as it decreases and increases the number of stacks in the inventory, it changes.
Tell me pls - how I can implement this in my code.
Sorry for my English
An example is this:
In the player's inventory, a stack of 28 items.
I will call it this:
Code: Select all
local factor = ("item name"). value (how much is in the stack)
And I need to do the following in code:
Code: Select all
mining_speed = 2 * 0.05 * factor,
mining_power = 6 * 0.05 * factor,
Tell me pls - how I can implement this in my code.
Sorry for my English
