DayZ 1.24
Loading...
Searching...
No Matches
BotTestSpamUserActions Class Reference
Inheritance diagram for BotTestSpamUserActions:
[legend]
Collaboration diagram for BotTestSpamUserActions:
[legend]

Private Member Functions

void BotTestSpamUserActions (Bot bot=NULL, BotStateBase parent=NULL)
 
override void OnEntry (BotEventBase e)
 
override void OnExit (BotEventBase e)
 
override void OnUpdate (float dt)
 
- Private Member Functions inherited from BotStateBase
void BotTimedWait (Bot bot=NULL, BotStateBase parent=NULL, float timeout=3.0)
 
override void OnEntry (BotEventBase e)
 
override void OnExit (BotEventBase e)
 
override void OnUpdate (float dt)
 
void OnTimeout ()
 

Private Attributes

EntityAI m_Entity
 
ref BotTestSpamUserActions_Start m_Start
 
ref BotTestSpamUserActions_GetEntityFromSlot m_GetRef
 
- Private Attributes inherited from BotStateBase
float m_Timeout = 3.0
 
bool m_Periodic = true
 

Detailed Description

Definition at line 147 of file Bot_TestSpamUserActions.c.

Constructor & Destructor Documentation

◆ BotTestSpamUserActions()

void BotTestSpamUserActions::BotTestSpamUserActions ( Bot bot = NULL,
BotStateBase parent = NULL )
inlineprivate

Definition at line 154 of file Bot_TestSpamUserActions.c.

155 {
156 // setup nested state machine
157 m_FSM = new BotFSM(this); // @NOTE: set owner of the submachine fsm
158
161
162 // events
164
165 // transitions
166 m_FSM.AddTransition(new BotTransition(m_Start, __EntWait__, m_GetRef));
167
168 m_FSM.SetInitialState(m_Start);
169 }
FSMTransition< BotStateBase, BotEventBase, BotActionBase, BotGuardBase > BotTransition
Definition BotFSM.c:7
represents event that triggers transition from state to state
Definition BotEvents.c:5
Bot Finite State Machine (Hierarchical)
ref BotFSM m_FSM
hierarchical parent state of this state (or null)
Definition BotStates.c:15
Bot m_Bot
man that this state belongs to
Definition BotStates.c:13
ref BotTestSpamUserActions_Start m_Start
ref BotTestSpamUserActions_GetEntityFromSlot m_GetRef

References BotStateBase::m_Bot, BotStateBase::m_FSM, m_GetRef, and m_Start.

Member Function Documentation

◆ OnEntry()

override void BotTestSpamUserActions::OnEntry ( BotEventBase e)
inlineprivate

Definition at line 171 of file Bot_TestSpamUserActions.c.

172 {
173 m_Entity = null;
174
175 if (GetGame().IsServer())
176 {
177 m_Owner.GetInventory().CreateAttachment("PolicePantsOrel"); // no assign to m_Entity
178 botDebugPrint("[bot] + " + m_Owner + " created attachment item=" + m_Entity);
179 }
180
181 super.OnEntry(e);
182 }
void botDebugPrint(string s)
Definition Bot.c:182
PlayerBase m_Owner
Definition BotStates.c:12
proto native CGame GetGame()

References botDebugPrint(), GetGame(), m_Entity, and BotStateBase::m_Owner.

◆ OnExit()

override void BotTestSpamUserActions::OnExit ( BotEventBase e)
inlineprivate

Definition at line 184 of file Bot_TestSpamUserActions.c.

185 {
186 m_Entity = null;
187
188 super.OnExit(e);
189 }

References m_Entity.

◆ OnUpdate()

override void BotTestSpamUserActions::OnUpdate ( float dt)
inlineprivate

Definition at line 191 of file Bot_TestSpamUserActions.c.

192 {
193 super.OnUpdate(dt);
194 }

Member Data Documentation

◆ m_Entity

EntityAI BotTestSpamUserActions::m_Entity
private

Definition at line 149 of file Bot_TestSpamUserActions.c.

Referenced by OnEntry(), and OnExit().

◆ m_GetRef

ref BotTestSpamUserActions_GetEntityFromSlot BotTestSpamUserActions::m_GetRef
private

Definition at line 151 of file Bot_TestSpamUserActions.c.

Referenced by BotTestSpamUserActions().

◆ m_Start

ref BotTestSpamUserActions_Start BotTestSpamUserActions::m_Start
private

Definition at line 150 of file Bot_TestSpamUserActions.c.

Referenced by BotTestSpamUserActions().


The documentation for this class was generated from the following file: