Is there a way to trigger a spawn based on an item in a container?
Players drop off logs into a container, the spawner then takes 1 log and kicks off. It continues to spawn (based on the min/max delay) as long as there are logs in the container.
Lara
you can set up spawners that trigger when things are added to containers. There are examples of that in xmlextras (chestguardian.xml I believe), but they just check the weight or number of items or amount of gold in the container to trigger.
You can change the amount on items in containers using the SETONNEARBY keyword with the searchcontainer argument set to true
SETONNEARBY,range,name[,type][,searchcontainers]/prop/value/prop/value...
for example setting a spawner next to the container and spawning an entry like
SETONNEARBY,1,,log,true/amount/INC,-1
would decrease the amount of logs in the container by 1.
The problem is that I havent yet added the GETONNEARBY keyword that would let you test the properties of thing inside of the container, like the logs, so you wouldnt really be able to do what you want to do yet.
I'll think about more general container access and how it could be incorporated into existing or new keywords.
All right, thank you. I'll keep looking for another way.
Lara