class HFSMBase<Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase>Source
base class for hierarchic finite state machine
stores current state (m_State) and transition table with possible transitions from each state to another state via event
each state can have nested state machine, thus creating hierarchy
Constructors 1
void HFSMBase(FSMStateBase ownerState = NULL)Members 5
protected ref FSMStateBase m_Statecurrent fsm state
Show 23 more
, FindFirstCompletionTransition(), FindFirstUnguardedTransition(), GetCurrentState(), IsRunning(), ProcessAbortEvent(), ProcessAbortTransition(), ProcessEvent(), ProcessLocalTransition(), SetCurrentState(), Start(), Terminate(), Update(), WeaponFSM.Internal_ValidateAndRepair(), WeaponFSM.LoadAndSetCurrentFSMState(), WeaponFSM.LoadCurrentFSMState(), WeaponFSM.OnFailThresholdBreached(), WeaponFSM.OnStoreLoad(), WeaponFSM.ProcessAbortEvent(), WeaponFSM.ProcessAbortTransition(), WeaponFSM.ProcessEvent(), WeaponFSM.ProcessLocalTransition(), WeaponFSM.RandomizeFSMStateEx(), and WeaponFSM.ValidateAndRepairHelper()protected FSMStateBase m_OwnerStatestate that owns this fsm (or null if root)
protected ref FSMStateBase m_InitialStateconfigurable initial state of the machine
protected ref array<ref FSMTransition<FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase>> m_Transitions = new array<ref FSMTransition<FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase>>fsm transition table
Show 11 more
, FindFirstUnguardedTransition(), FindGuardedTransitionState(), FindTransitionState(), LocalTransition(), ProcessAbortEvent(), ProcessCompletionTransitions(), ProcessEvent(), WeaponFSM.FindStableStateForID(), WeaponFSM.ProcessAbortEvent(), WeaponFSM.ProcessEvent(), and WeaponFSM.RandomizeFSMStateEx()protected bool m_HasCompletions = falseMethods 22
FSMStateBase GetCurrentState()Returns: returns currently active state within this machine (i.e. not hierarchic state)
Show 16 more
, BotStateBase.OnUpdate(), DayZPlayerInventory.HandleInventory(), DayZPlayerInventory.IsProcessing(), HandStateBase.IsWaitingForActionFinish(), HandStateBase.OnUpdate(), HumanInventoryWithFSM.IsIdle(), Weapon_Base.GetCurrentState(), Weapon_Base.OnStoreLoad(), WeaponFSM.GetCurrentStableStateID(), WeaponFSM.GetInternalStateID(), WeaponFSM.LoadCurrentFSMState(), WeaponFSM.OnStoreSave(), WeaponFSM.SaveCurrentFSMState(), WeaponFSM.SaveCurrentUnstableFSMState(), WeaponStateBase.IsWaitingForActionFinish(), and WeaponStateBase.OnUpdate()void SetCurrentState(FSMStateBase state)Returns: returns currently active state within this machine (i.e. not hierarchic state)
FSMStateBase GetOwnerState()Returns: returns state that is owner of this fsm submachine. returns null if this is a root machine.
returns hierarchic state (path to root) of a state
- in
state statethe path is starting- out
path currenthierarchic state
Returns: true if current state returned in path argument, false otherwise
void SetInitialState(FSMStateBase initial_state)- in
initial_state statethe machine will be entered to after ::Start()- in
initial_event eventthat will be used to start the machine
Show 38 more
, BotHunt.BotHunt(), BotTestAttachAndDropCycle.BotTestAttachAndDropCycle(), BotTestItemMoveBackAndForth.BotTestItemMoveBackAndForth(), BotTestSpamUserActions.BotTestSpamUserActions(), ChamberMultiBullet.ChamberMultiBullet(), HandAnimatedForceSwapping.HandAnimatedForceSwapping(), HandAnimatedForceSwapping_Inst.HandAnimatedForceSwapping_Inst(), HandAnimatedMovingToAtt.HandAnimatedMovingToAtt(), HandAnimatedSwapping.HandAnimatedSwapping(), HandAnimatedTakingFromAtt.HandAnimatedTakingFromAtt(), HandReplacingItemElsewhereWithNewInHands.HandReplacingItemElsewhereWithNewInHands(), HandReplacingItemInHands.HandReplacingItemInHands(), HumanInventoryWithFSM.Init(), LoopedChambering.LoopedChambering(), LoopedChamberingCombineChamberInternalMagazine.LoopedChamberingCombineChamberInternalMagazine(), LoopedChamberingEjectLast.LoopedChamberingEjectLast(), RifleChambering.RifleChambering(), RifleEjectCasing.RifleEjectCasing(), RifleReChambering.RifleReChambering(), Weapon_Base.SetInitialState(), WeaponAttachMagazine.WeaponAttachMagazine(), WeaponAttachMagazineOpenBoltCharged.WeaponAttachMagazineOpenBoltCharged(), WeaponChambering.WeaponChambering(), WeaponCharging.WeaponCharging(), WeaponChargingInnerMag.WeaponChargingInnerMag(), WeaponChargingMultiple.WeaponChargingMultiple(), WeaponChargingStretch.WeaponChargingStretch(), WeaponDetachingMag.WeaponDetachingMag(), WeaponDetachingMagOpenBolt.WeaponDetachingMagOpenBolt(), WeaponEjectBullet.WeaponEjectBullet(), WeaponFireAndChamberNext.WeaponFireAndChamberNext(), WeaponFireAndChamberNextFromInnerMag.WeaponFireAndChamberNextFromInnerMag(), WeaponFireLast.WeaponFireLast(), WeaponMagnumChambering.WeaponMagnumChambering(), WeaponRechamber.WeaponRechamber(), WeaponReplacingMagAndChamberNext.WeaponReplacingMagAndChamberNext(), WeaponReplacingMagAndChamberNextOpenBoltCharged.WeaponReplacingMagAndChamberNextOpenBoltCharged(), and WeaponUnjamming.WeaponUnjamming()void AddTransition(FSMTransition<FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase> t)adds transition into transition table
Show 4 more
, FSMTransition.m_event, m_HasCompletions, FSMTransition.m_srcState, and m_TransitionsShow 19 more
, Bot_TestSpawnOpenDestroy.Bot_TestSpawnOpenDestroy(), Bot_TestSpawnOpenDrop.Bot_TestSpawnOpenDrop(), Bot_TestSpawnOpenEat.Bot_TestSpawnOpenEat(), BotHunt.BotHunt(), BotStateBase.AddTransition(), BotTestAttachAndDropCycle.BotTestAttachAndDropCycle(), BotTestItemMoveBackAndForth.BotTestItemMoveBackAndForth(), BotTestSpamUserActions.BotTestSpamUserActions(), DayZPlayerInventory.Init(), HandAnimatedForceSwapping.HandAnimatedForceSwapping(), HandAnimatedForceSwapping_Inst.HandAnimatedForceSwapping_Inst(), HandAnimatedMovingToAtt.HandAnimatedMovingToAtt(), HandAnimatedSwapping.HandAnimatedSwapping(), HandAnimatedTakingFromAtt.HandAnimatedTakingFromAtt(), HandReplacingItemElsewhereWithNewInHands.HandReplacingItemElsewhereWithNewInHands(), HandReplacingItemInHands.HandReplacingItemInHands(), HandStateBase.AddTransition(), HumanInventoryWithFSM.Init(), and WeaponFSM.AddTransition()void Start(FSMEventBase initial_event = NULL, bool useExistingState = false)starts the state machine by entering the initial_state (using intial_event as argument to initial state's onEntry)
- in
e optionalevent for starting the machind
Show 7 more
, ProcessCompletionTransitions(), ToString(), ToString(), Class.ToString(), m_HasCompletions, m_InitialState, and m_StateShow 24 more
, BotStateBase.OnEntry(), ChamberFirst_InnerMagazine_SemiAutomatic_Base.InitStateMachine(), Crossbow_Base.InitStateMachine(), DoubleBarrel_Base.InitStateMachine(), Flaregun.InitStateMachine(), HandStateBase.OnEntry(), HumanInventoryWithFSM.Init(), Magnum_Base.InitStateMachine(), Mp133Shotgun_Base.InitStateMachine(), OpenBolt_Base.InitStateMachine(), Pistol_Base.InitStateMachine(), Repeater_Base.InitStateMachine(), Rifle_Base.InitStateMachine(), RifleBoltFree_Base.InitStateMachine(), RifleBoltLock_Base.InitStateMachine(), RifleSingleShot_Base.InitStateMachine(), RifleSingleShotManual_Base.InitStateMachine(), SingleShotPistol_Base.InitStateMachine(), SKS_Base.InitStateMachine(), WeaponFSM.LoadAndSetCurrentFSMState(), WeaponFSM.OnStoreLoad(), WeaponFSM.RandomizeFSMStateEx(), WeaponFSM.ValidateAndRepairHelper(), and WeaponStateBase.OnEntry()bool IsRunning()returns true if machine is in running state
Show 18 more
, BotStateBase.OnUpdate(), DayZPlayerInventory.HandleInventory(), HandStateBase.IsWaitingForActionFinish(), HandStateBase.OnAbort(), HandStateBase.OnEntry(), HandStateBase.OnUpdate(), Abort(), FindFirstCompletionTransition(), Terminate(), Update(), HumanInventoryWithFSM.CanProcessHandEvents(), HumanInventoryWithFSM.CheckFSMState(), Weapon_Base.CanProcessWeaponEvents(), Weapon_Base.SaveCurrentFSMState(), WeaponStateBase.IsWaitingForActionFinish(), WeaponStateBase.OnAbort(), WeaponStateBase.OnEntry(), and WeaponStateBase.OnUpdate()void Terminate(FSMEventBase terminal_event = NULL)terminates the state machine
Show 4 more
, OnExit(), ToString(), Class.ToString(), and m_StateShow 2 more
, WeaponFSM.RandomizeFSMStateEx(), and WeaponFSM.ValidateAndRepairHelper()void Abort(FSMEventBase abort_event = NULL)Show 4 more
, OnAbort(), ToString(), Class.ToString(), and m_Statevoid Update(float dt)if machine running, call OnUpdate() on current state
protected ProcessEventResult ProcessAbortTransition(FSMTransition<FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase> t, FSMEventBase e)Show 14 more
, GetParentState(), LogManager.IsInventoryHFSMLogEnable(), OnAbort(), OnEntry(), ToString(), ToString(), ToString(), ToString(), ToString(), FSMTransition.m_action, FSMTransition.m_dstState, FSMTransition.m_guard, FSMTransition.m_srcState, and m_StateFSMStateBase FindAbortDestinationState(FSMEventBase e)i
- in
e eventthat will be used to find suitable transition from current state
Returns: FSM_OK if transition found and allowed by guard (if any) FSM_NO_TRANSITION if no unguarded transition found in submachine or local machine FSM_TERMINATED state machine has terminated FSM_ABORTED state machine has aborted
Show 12 more
, array.Get(), GetFSM(), GetOwnerState(), HasFSM(), LogManager.IsInventoryHFSMLogEnable(), ToString(), ToString(), ToString(), Class.Type(), Class.Type(), m_State, and m_TransitionsFSMStateBase ProcessAbortEvent(FSMEventBase e, out ProcessEventResult result)instructs the hierarchical state machine to process the event e
- in
e eventthat will be used to find suitable transition from current state
Returns: FSM_OK if transition found and allowed by guard (if any) FSM_NO_TRANSITION if no unguarded transition found in submachine or local machine FSM_TERMINATED state machine has terminated FSM_ABORTED state machine has aborted
Show 16 more
, GetFSM(), GetOwnerState(), GetParentState(), HasFSM(), LogManager.IsInventoryHFSMLogEnable(), OnAbort(), OnEntry(), ProcessAbortEvent(), ProcessAbortTransition(), ToString(), ToString(), ToString(), Class.Type(), Class.Type(), m_State, and m_TransitionsProcessEventResult ProcessEvent(FSMEventBase e)instructs the hierarchical state machine to process the event e
- in
e eventthat will be used to find suitable transition from current state
Returns: FSM_OK if transition found and allowed by guard (if any) FSM_NO_TRANSITION if no unguarded transition found in submachine or local machine FSM_TERMINATED state machine has terminated
Show 20 more
, fsmDebugPrint(), fsmDebugSpam(), array.Get(), GetOwnerState(), GetParentState(), GetParentState(), HasFSM(), LogManager.IsInventoryHFSMLogEnable(), LogManager.IsWeaponLogEnable(), LocalTransition(), ProcessCompletionTransitions(), ProcessEvent(), ToString(), ToString(), ToString(), Class.Type(), Class.Type(), m_HasCompletions, m_State, and m_Transitionsprotected int FindFirstUnguardedTransition(FSMEventBase e)Show 4 more
, Class.Type(), Class.Type(), m_State, and m_TransitionsShow 2 more
, WeaponFSM.ProcessAbortEvent(), and WeaponFSM.ProcessEvent()FSMStateBase FindTransitionState(FSMStateBase s, FSMEventBase e)FSMStateBase FindGuardedTransitionState(FSMStateBase s, FSMEventBase e)Show 3 more
, Class.Type(), Class.Type(), and m_Transitionsprotected int FindFirstCompletionTransition()Show 5 more
, IsRunning(), Class.Type(), Class.Type(), m_State, and m_Transitionsprotected ProcessEventResult ProcessLocalTransition(FSMTransition<FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase> t, FSMEventBase e)instructs the state machine to process the event locally - no hierarchy is crossed
- in
t thetransition in m_Transitions- in
e eventthat will be used to process transition from current state
Returns: FSM_OK or FSM_TERMINATED
Show 15 more
, LogManager.IsInventoryHFSMLogEnable(), OnEntry(), OnExit(), OnStateChanged(), OnSubMachineChanged(), ToString(), ToString(), ToString(), ToString(), ToString(), FSMTransition.m_action, FSMTransition.m_dstState, FSMTransition.m_guard, FSMTransition.m_srcState, and m_Stateprotected ProcessEventResult LocalTransition(int i, FSMEventBase e)instructs the state machine to process the event e
- in
i indexof the transition in m_Transitions- in
e eventthat will be used to process transition from current state
Returns: FSM_OK or FSM_TERMINATED
protected ProcessEventResult ProcessCompletionTransitions()