Conveyor: RemoveBlockage
Called to remove a previously created blockage on the Conveyor.
No error is produced if RemoveBlockage
is called with a non-existent Blockage handle.
A Blockage can only be removed by specifying its handle.
🔁 Function
void RemoveBlockage(blockagehandle: integer)
⚙️ Parameters
Name | Type | Description |
---|---|---|
blockageHandle |
Integer | The handle for the blockage to remove |
↩️ Return Value
A handle value that will be used to remove the blockage.
📝 Example
var oBlockConv;
var oConv = GetComponentByNameAndType("Conveyor1", "Conveyor");
function OnSimulationStart() {
LogDebug("OnSimulationStart called");
oBlockConv = oConv.CreateBlockage(1);
SetTimerEx(1234, 5000, "ClearBlockage", null);
MoveProduct(CreateProduct(), "Conveyor1", 0);
}
function ClearBlockage(timerid, object) {
LogDebug("Products=" + oConv.ProductCount );
oConv.RemoveBlockage(oBlockConv);
}