Skip to main content

B2Action_LaunchSetClass

  • Description
    * ===============
    * Opens the school set-class UI so the possessed character can pick which enrolled teen Zois belong to the given class, then assigns the selected Zois to that class on the school entity.
    * ===============
    * Param:
    * S1: Class Id
    * S2: -
    * F1: -
    * F2: -
    * Note:
    * OnInit(): Resolves the school entity from the target's site and parses ClassId from Action.S1.
    * OnPlay(): Sends the open set-class UI packet with the enrolled teen candidates, subscribes to the select/cancel completion events, then pauses the simulation while the UI is open.
    * OnTick(): Nothing; this action waits for the UI callbacks. The pause stops the simulation clock, so this action must never rely on in-game time to finish.
    * OnFinish(): If the open-UI packet was sent, resumes the simulation, unsubscribes from the events and sends the hide-UI packet.
    * OnCanceled(): Same cleanup as OnFinish(), skipped when the cancellation itself comes from a restore (bRestore).
    * OnB2PreBeginPlay(): Cancels the interaction when restored mid-play, because the UI is gone and the selection callbacks no longer exist.
PropertyTypeDescriptionMetadata
SchoolEntityIdFB1EntityIdSchool entity that owns the class being edited, resolved from the target object's site
ClassIdint32Zero-based class index the selected Zois are assigned to, parsed from Action.S1
bSendPacketboolWhether the open-UI packet was actually sent, gating the resume/unsubscribe/hide-UI cleanup
ActionIdFNameIdentifier of this action instance (used for interaction tracking and mission time accounting)
StateEB2ActionStateCurrent lifecycle state of this action
MergeTypeEB2ActionMergeTypeMerge type flags for this action (e.g. interaction merge, checked in Finish())
ResultEB2InteractionResultResult of this action once it stops playing (Finish/Failed/Canceled)
SelfEntityIdFB1EntityIdEntity id performing this action
TargetEntityIdFB1EntityIdEntity id targeted by this action
GrabEntityIdFB1EntityIdEntity id grabbed/carried by self entity for this action
NonTargetLocationFVectorLocation used for script/condition context when there is no target entity
ActionFB1ActionInfoAction table data (S1/S2/F1/F2, script id lists, etc.) driving this instance
TickCalcValuefloatAccumulated tick delta time since this action started ticking
CurrentNotifyIndexint32Index into Action.NotifyScriptIds for the next notify script to run
AsyncLoadAnimInfoTArrayAnimations to async-load for this action's start/notify/tick/finish/cancel scripts
AddActionTimeIntervalfloatInterval in seconds between OnTickAddActionExecuteTime() calls
AccumAddActionTimefloatElapsed time accumulator compared against AddActionTimeInterval
StartActionTickTimeint64Tick timestamp used to measure elapsed action execution time for mission tracking
ActionKeyFB2ActionKeyKey identifying this action's slot/queue within the interaction system
TimeTaskIdFB1TimeTaskIdId of the scheduled time task used for delayed Determine/Finish
IsForceCancelableboolWhether this action is force-cancelable, copied from Action.IsForceCancelable
IsFirstActionboolMarks the first action in an interaction sequence; set on actions[0] by FB2InteractionPlayer::LinkActions(), read by FB2ActionPlayer
bMultiFlagboolSet by looping actions (PlayAnim, BookRead, Eat, WaitTalkSequence) once a loop iteration completes; read/reset by FB2ActionPlayer to gate multi-interaction selection
TalkInstanceIdFB1TalkInstanceIdId of the talk instance this action is linked to, set externally by FB2InteractionPlayer::LinkActions()
TalkSubjectEntityIdFB1EntityIdEntity id of the talk subject linked to this action, set externally by FB2InteractionPlayer::LinkActions()/OnTalkSpaceParamChanged()
bIsWaitFinishEventboolCached copy of Action.IsWaitFinishAction taken at Init(); read directly by FB2ActionPlayer for sequencing (the IsWaitFinishAction() getter instead reads Action.IsWaitFinishAction live)
AutoInsertTypeEB2ActionAutoInsertTypeType of action that was auto-inserted before this one (e.g. WalkTo, ChangePosture)