Called when an entity changes routing bucket on the server.
int entity, int bucket, int oldBucket
This example prints the entity id, the new routing bucket, and the old routing bucket to the server console.
AddEventHandler('onEntityBucketChange', function(entity, bucket, oldBucket)
print('Entity ' .. entity .. ' changed routing bucket from ' .. oldBucket .. ' to ' .. bucket)
end)
// In class constructor
EventHandlers["onEntityBucketChange"] += new Action<int, int, int>(OnEntityBucketChange);
// Delegate method
private void OnEntityBucketChange(int entity, int bucket, int oldBucket)
{
Debug.WriteLine($"Entity {entity} changed routing bucket from {oldBucket} to {bucket}.");
}
on("onEntityBucketChange", (entity, bucket, oldBucket) => {
console.log(`Entity ${entity} changed routing bucket from ${oldBucket} to ${bucket}.`);
});