Register an event that runs when an object with the provided tag starts using a component.
param tag- The tag to match, only called for objects with a matching tag.
param action- The function that runs when the event happens.
// This will run when the tagged object uses a new component.
onUse("taggedObjTag", (obj, compId) => {
debug.log(obj, component);
});
returns The event controller.
since v2000.0
group Events