#(Doxa) Modifying virtual inventory
28 messages · Page 1 of 1 (latest)
(Doxa) Modifying virtual inventory
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
kind of depends on what you mean by expire...
if you want the contents to exist for only 10 seconds you can just set a timer and then wipe it?
or have that conents flag have an experation?
the contents flag expire after 10 seconds
"if you want the contents to exist for only 10 seconds you can just set a timer and then wipe it?"
how would i do this
but since the player can put items in the virtual inventory i want that to be tracked and say if the player closes that inventory, they can open it back with the same item contents, until the 10 seconds has passed
===================================
OR what I could do is:
Save the inventory's contents each time its closed ( through a flag/definition whatever is better )
then when open up the inventory with the specific flags items
so, you want only items with x flag disappear from the inventory once the flag expires, while keeping items with y flag that hasnt expired yet?
yes
on player opens the inventory, wait 10s, inventory clear it
yea
on inventory close, flag the contents in a player flag for the remaining time
but until than it can be modified
yep
!lang inventory script
Inventory script containers are an easy way to pre-define custom inventories for use within scripts.
Inventory scripts work with the InventoryTag object, and can be fetched with the Object Fetcher by using the
InventoryTag constructor InventoryTag_script_name.
Example: - inventory open d:MyInventoryScript
The following is the format for the container.
The 'inventory:' key is required, other keys vary based on the type.
Some types will require you define either 'size:' or 'slots:' (or both).
'Procedural items:' and 'definitions:' are optional, and should only be defined if needed.
<code>
The name of the script is the same name that you can use to construct a new
InventoryTag based on this inventory script. For example, an inventory script named 'Super_Cool_Inventory'
can be referr...
Script Container System
Should use an inventory script, so its easier for you generating it and referencing it in events