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

Private Member Functions

void BotTestSwapG2H (Bot bot=NULL, BotStateBase parent=NULL)
 
override void OnEntry (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_Entity1
 
EntityAI m_Entity2
 
- Private Attributes inherited from BotStateBase
float m_Timeout = 3.0
 
bool m_Periodic = true
 

Detailed Description

Definition at line 82 of file Bot_Tests.c.

Constructor & Destructor Documentation

◆ BotTestSwapG2H()

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

Definition at line 87 of file Bot_Tests.c.

88 { }

Member Function Documentation

◆ OnEntry()

override void BotTestSwapG2H::OnEntry ( BotEventBase e)
inlineprivate

Definition at line 90 of file Bot_Tests.c.

91 {
92 super.OnEntry(e);
93 EntityAI j = m_Owner.GetInventory().CreateAttachment("Jeans_Blue");
94 m_Entity1 = j.GetInventory().CreateEntityInCargo("Rag");
95 EntityAI s = m_Owner.GetInventory().CreateInInventory("TacticalShirt_Grey");
96 m_Entity2 = s.GetInventory().CreateEntityInCargo("Roadflare");
97 m_Owner.PredictiveDropEntity(m_Entity2);
98 }
PlayerBase m_Owner
Definition BotStates.c:12
EntityAI m_Entity1
Definition Bot_Tests.c:84
EntityAI m_Entity2
Definition Bot_Tests.c:85

References m_Entity1, m_Entity2, and BotStateBase::m_Owner.

◆ OnUpdate()

override void BotTestSwapG2H::OnUpdate ( float dt)
inlineprivate

Definition at line 100 of file Bot_Tests.c.

101 {
102 super.OnUpdate(dt);
103
104 /*if (m_Entity1 && m_Entity2)
105 {
106 if (m_Owner.GetInventory().CanSwapEntities(m_Entity1, m_Entity2))
107 {
108 botDebugPrint("[bot] + " + m_Owner + " -> swap item=" + m_Entity1 + " bot=" + m_Owner);
109 m_Owner.PredictiveSwapEntities(m_Entity1, m_Entity2);
110 }
111 else if (m_Owner.GetInventory().CanSwapEntities(m_Entity2, m_Entity1))
112 {
113 botDebugPrint("[bot] + " + m_Owner + " <- swap item=" + m_Entity2 + " bot=" + m_Owner);
114 m_Owner.PredictiveSwapEntities(m_Entity2, m_Entity1);
115 }
116 }*/
117 }

Member Data Documentation

◆ m_Entity1

EntityAI BotTestSwapG2H::m_Entity1
private

Definition at line 84 of file Bot_Tests.c.

Referenced by OnEntry().

◆ m_Entity2

EntityAI BotTestSwapG2H::m_Entity2
private

Definition at line 85 of file Bot_Tests.c.

Referenced by OnEntry().


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