FB2Action_Coop
Overview
- Coop action. Override the OnPlay/OnFinish/OnPaused/OnCanceled/OnTick timing hooks in Lua.
Metadata
| Field | Value |
|---|---|
| Kind | action |
| Environment | B2 - Simulation |
| Category | actions |
| Extends | FB2Action_Base |
| Require | require('Actions.B2Action_Coop') |
Properties (5)
| Name | Type | Description |
|---|---|---|
CoopId | string | coop table row id to start, from InAction.S1 or resolved from the current interaction's coop-start info |
CoopType | EB1CoopType | type of coop to start, from InAction.S2 or resolved from the current interaction/zoi-group-rotation state |
DelayTime | number | Checked the entire Coop scheduler family (B2CoopScheduler_Bargain/Coop/EnterVehicle/HandOver/MoveTogether/Talk/Visit/ZoiGroupMove/Competition/GroupRotation) - DelayTime appears nowhere else in the codebase. Likely a LUAPROPERTY hook for a Lua-side override that's never exercised in current C++ code |
InteractionBagId | string | current interaction bag id, cached at OnPlay for use in coop request params |
LastCoopResult | EB1CoopResult | result of the last coop/talk start attempt, used to build the result toast message |
Functions (5)
| Function | Parameters | Returns | Description |
|---|---|---|---|
OnCanceled | - | - | Callback invoked on Canceled. |
OnFinish | - | - | Callback invoked on Finish. |
OnPaused | - | - | Callback invoked on Paused. |
OnPlay | - | - | Callback invoked on Play. |
OnTick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | Callback invoked on Tick. |
Override points (5)
Implement these in Lua as FB2Action_Coop.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_OnCanceled | - | - | Timing hook called when the action is canceled. |
Override_OnFinish | - | - | Timing hook called when the action finishes. |
Override_OnPaused | - | - | Timing hook called when the action is paused. |
Override_OnPlay | - | - | Timing hook called when the action starts (play). Override in Lua to replace the start behavior. |
Override_OnTick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | Timing hook called every tick while the action runs. (performance-sensitive) |