21class FreshSpawn_Preset
extends PresetSpawnBase
25 FindAndTakeToHandsFromInventory(
"Plum");
30class Farmer_Preset
extends PresetSpawnBase
34 EntityAI mask = FindItem(
"AirborneMask");
39class Fisherman_Preset
extends PresetSpawnBase
45 entAI = FindItem(
"FishingRod");
46 player.SetQuickBarEntityShortcut(entAI,0);
48 entAI = FindItem(
"ImprovisedFishingRod");
49 player.SetQuickBarEntityShortcut(entAI,1);
51 entAI = FindItem(
"Rag");
52 player.SetQuickBarEntityShortcut(entAI,2);
54 entAI = FindItem(
"FieldShovel");
55 player.SetQuickBarEntityShortcut(entAI,3);
57 entAI = FindItem(
"HuntingKnife");
58 player.SetQuickBarEntityShortcut(entAI,4);
63class AntiHazard_Preset
extends PresetSpawnBase
67 EntityAI mask = FindItem(
"AirborneMask");
71 auto debugParams = DebugSpawnParams.WithPlayer(player);
72 mask.OnDebugSpawnEx(debugParams);
78class Update117_Preset
extends PresetSpawnBase
83 randompos = player.GetPosition();
84 foreach (
EntityAI itm : m_ItemsPreset)
89 itempos[0] =
Math.RandomFloat(-1,1);
90 itempos[2] =
Math.RandomFloat(-1,1);
94 itmBase.SetPosition(randompos + itempos);
95 itmBase.SetQuantity(100);
102class Update118_Preset
extends PresetSpawnBase
105 override void OnPresetSpawn(
PlayerBase player)
107 randompos = player.GetPosition();
108 foreach (
EntityAI itm : m_ItemsPreset)
113 itempos[0] =
Math.RandomFloat(-1,1);
114 itempos[2] =
Math.RandomFloat(-1,1);
118 itmBase.SetPosition(randompos + itempos);
119 itmBase.SetQuantity(100);
126class BBMaterials_Preset
extends PresetSpawnBase
129 override void OnPresetSpawn(
PlayerBase player)
131 randompos = player.GetPosition();
132 foreach (
EntityAI itm : m_ItemsPreset)
137 itempos[0] =
Math.RandomFloat(-1,1);
138 itempos[2] =
Math.RandomFloat(-1,1);
139 itm.SetPosition(randompos + itempos);
146class Military_Light_Preset
extends PresetSpawnBase
148 override void OnPresetSpawn(
PlayerBase player)
150 EntityAI weapon = FindItem(
"AK101");
152 auto debugParams = DebugSpawnParams.WithPlayer(player);
153 weapon.OnDebugSpawnEx(debugParams);
155 FindAndTakeToHandsFromInventory(
"AK101");
178 m_ItemsPreset = player.m_PresetItems;
180 OnPresetSpawn(player);
182 foreach (
auto item:m_ItemsPreset)
200 if (
GetGame().IsDedicatedServer())
211 void FindAndTakeToHandsFromInventory(
string classname)
214 foreach(
EntityAI item:m_ItemsInventory)
216 if (item.ClassName() == classname)
227 foreach(
EntityAI item:m_ItemsInventory)
229 if (item.ClassName() == classname)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
inventory for plain man/human
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerInstanceType
defined in C++
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.