Brento666 wrote:(so a) Machine with 3 slots
Slot0 = Coffee Beans loadded
Slot1 = Coffee mug
Slot2 = empty/prisoner
Only gonna need 2 slots...
The provider in needs.txt cant be the coffee machine, imagine that the slot0 is empty... The prisoner gets stuck in the machine. Since i cant find a way to kick the prisoners im doing the following
1) Slot0 is loaded with a stack of 10 coffee beans
2) One unit of beans is deleted
3) The machine spawns one coffee mug
The needs.txt
Object CoffeeMug
Unless someone call tell me a way to prevent prisoners from using the machine when its out of beans...
In chads mod he uses
Code: Select all
if this.waterLeft > 0 then
this.Slot0.i = -1
this.Slot0.u = -1
else
this.Slot0 = this.Id
endThis seems to make the slot used by inmates occupied but it doesnt seem to be working...
Edited:
The following code removes the stack of coffee beans from slot0 and makes it available to use but this cant be used for prisoners, for some reason they get deleted.. lol
Code: Select all
stack = GetObject("Stack",this.Slot0.i);
this.Slot0.i = -1;
this.Slot0.u = -1;
stack.Loaded = false;



