sm.event.sendToHarvestable
Sends an event to a specified Harvestable.
Kind: Function
Environments: Game
Game
sm.event.sendToHarvestable(
harvestable,
callback,
args,
eventType,
pauseSave
)
Parameters:
| Name | Type | Description |
|---|---|---|
harvestable |
Harvestable | The harvestable. |
callback |
string | The function name in a harvestable script. |
args (optional) |
any | Optional arguments to be sent to the callback. |
eventType (optional) |
integer | The type of event. Defaults to sm.event.types.validate. |
pauseSave (optional) |
boolean | Optional, defaults to true. If true, pauses saving for 1 tick for delayed event types (server only). |
Returns:
| Name | Type | Description |
|---|---|---|
result |
boolean | Returns true if the event was successfully processed. |