2class BotTestSpamUserActions_Start : BotTimedWait
4 override void OnEntry (BotEventBase e)
10 override void OnExit (BotEventBase e)
12 botDebugPrint(
"[bot] + " +
m_Owner +
"BotTestSpamUserActions_Start::OnExit");
26class BotTestSpamUserActions_GetEntityFromSlot : BotTimedWait
31 ref InventoryLocation
m_Src =
new InventoryLocation;
33 override void OnEntry (BotEventBase e)
36 botDebugPrint(
"[bot] + " +
m_Owner +
"BotTestSpamUserActions_GetEntityFromSlot item=" +
m_Entity);
44 if (!
g_Game.IsDedicatedServer())
53 override void OnExit (BotEventBase e)
64 if (!
g_Game.IsDedicatedServer())
72 botDebugPrint(
"[bot] + " +
m_Owner +
" STS = " +
m_Owner.GetSimulationTimeStamp() +
" Stage=" + m_RunStage +
" item=" +
m_Entity);
73 ScriptInputUserData ctx =
new ScriptInputUserData;
75 InventoryInputUserData.SerializeHandEvent(ctx, e);
80 botDebugPrint(
"[bot] + " +
m_Owner +
" STS = " +
m_Owner.GetSimulationTimeStamp() +
" Stage=" + m_RunStage +
" item=" +
m_Entity);
81 ScriptInputUserData ctx1 =
new ScriptInputUserData;
83 InventoryInputUserData.SerializeHandEvent(ctx1, e1);
88 botDebugPrint(
"[bot] + " +
m_Owner +
" STS = " +
m_Owner.GetSimulationTimeStamp() +
" Stage=" + m_RunStage +
" item=" +
m_Entity);
89 ScriptInputUserData ctx2 =
new ScriptInputUserData;
90 InventoryLocation dst =
new InventoryLocation;
97 botDebugPrint(
"[bot] + " +
m_Owner +
" STS = " +
m_Owner.GetSimulationTimeStamp() +
" Stage=" + m_RunStage +
" item=" +
m_Entity);
98 ScriptInputUserData ctx3 =
new ScriptInputUserData;
99 InventoryLocation dst2 =
new InventoryLocation;
132 override void OnTimeout ()
136 botDebugPrint(
"[bot] + " +
m_Owner +
"BotTestSpamUserActions_GetEntityFromSlot item=" +
m_Entity);
147class BotTestSpamUserActions : BotStateBase
150 ref BotTestSpamUserActions_Start m_Start;
151 ref BotTestSpamUserActions_GetEntityFromSlot m_GetRef;
154 void BotTestSpamUserActions (Bot bot = NULL, BotStateBase parent = NULL)
157 m_FSM =
new BotFSM(
this);
159 m_Start =
new BotTestSpamUserActions_Start(m_Bot,
this, 1.0);
160 m_GetRef =
new BotTestSpamUserActions_GetEntityFromSlot(m_Bot,
this, 2.0);
163 BotEventBase __EntWait__ =
new BotEventWaitTimeout;
166 m_FSM.AddTransition(
new BotTransition( m_Start, __EntWait__, m_GetRef));
168 m_FSM.SetInitialState(m_Start);
171 override void OnEntry (BotEventBase e)
177 m_Owner.GetInventory().CreateAttachment(
"PolicePantsOrel");
178 botDebugPrint(
"[bot] + " +
m_Owner +
" created attachment item=" +
m_Entity);
184 override void OnExit (BotEventBase e)
ref InventoryLocation m_Src
HandStateEquipped OnEntry
enum ProcessDirectDamageFlags m_Owner
class WeaponChambering_Chamber_OnEntry extends WeaponChambering_Base OnExit
proto native GameInventory GetInventory()
override bool PredictiveDropEntity(notnull EntityAI item)
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
override void OnEntry(HandEventBase e)
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
sets current inventory location type to Attachment with slot id set to <slotId>