Another class of special snippets that don’t use a listener. Instead some B# functions (OUTPUTS) when executed can specify a callback as the last parameter, which will execute the associated snippet when relevant.
There are 2 callbacks, taken from the documentation itself:
/**
* Logic to execute when an entity has arrived or failed to reach its destination.
* ex. **OUTPUT_MoveEntity(..., "mc_retreat_after_reaching_destination")**
*
* @param snippetName The snippet name.
* @param callback The callback to call.
*/
declare function SNIPPET_MoveCallback(snippetName: string, callback: MoveCallbackCallback): void
declare type MoveCallbackCallback = (moverEntityGroup: number, successfullyArrived: boolean, payload: SnippetPayload) => void
/**
* Use `SpawnedBuildableCallback(snippetName)` instead!
* ex. **OUTPUT_SpawnBuildableAt(..., "sbc_spawn_guarding_mobs")**
*
* @param snippetName The snippet name.
* @param callback The callback to call.
*/
declare function SNIPPET_SpawnedBuildableCallback(snippetName: string, callback: SpawnedBuildableCallbackCallback): void
declare type SpawnedBuildableCallbackCallback = (completedStructure: number, payload: SnippetPayload) => void