Physics Conveyor: OnProductAdded

Invoked when a product is added to the physics conveyor.

Note: This event does not support multiple subscription.

Event

void xxxxxxxxxxxxxxxxx(sender: object, product: Product);

Parameters

Name Type Description
sender Object The physics conveyor
product Product The product was added

Example

// Print a message whenever a new product is added to PhysicsConveyor1.
function PrintProductNameAdded(conveyor, product)
{
    LogDebug(`Product '${product.Name}' added to conveyor '${conveyor.Name}'.`);
}
SubscribeToEvent("OnProductAdded", "PhysicsConveyor1", "Physics Conveyor", PrintProductNameAdded);