DayZ 1.24
Loading...
Searching...
No Matches
AIBehaviour.c
Go to the documentation of this file.
7/*
8 class AIMessage: Managed
9
10 {
11 Param m_Parameters;
12 int m_CrcMessage;
13 Param GetParameters();
14 int GetTypeNameCRC();
15 }
16
17 class AIMessageTest : AIMessage
18 {
19 int GetTypeNameCRC() {return testCRC;}
20 //static int testCRC = 5;
21 }
22
23*/
24
25
27{
28 private void AIBehaviourHLData() {}
29 private void ~AIBehaviourHLData() {}
30
31 //void ParseConfig(ParamEntryPar param, AIWorld* world, AIAgentTemplate* agentTemplate) {};
33
34 //Can be use only inside OnParseConfig function
38
39}
40
41
42class AIBehaviourHL
43{
44 private void AIBehaviourHL() {}
45 private void ~AIBehaviourHL() {}
48
49 void OnInit() {};
50 //private void AIBehaviourHL_script() {};
51 //private void ~AIBehaviourHL_script() {};
53 void Simulate(float timeDelta)
54 {
55 //time = time + timeDelta;
56 //Print("A2");
57 }
58
59
60 //void OnNoise(AINoiseInfo noise, EntityAI source){}
62
65 //void OnMessage(AIMessage message){}
66 //void OnBehaviourSwitched(AIBehaviour* behaviour){}
69
70 static proto void RegAIBehaviour(string behname, typename behClass, typename behClassData);
71};
72
73
74class AIBehaviourHLZombie2 : AIBehaviourHL
75{
76 //AIBehaviourHLDataZombie2 data;
77 //int state;
78 //float time;
83
84 private void AIBehaviourHLZombie2() {}
85 private void ~AIBehaviourHLZombie2() {}
86
87 override void OnInit()
88 {
89 SetNextBehaviour(0x7b9a4ee9);
91 //Print("OnInit");
92 //data = GetData();
93 //float a = data.m_fDamageToCrawl;
94 //Print(a);
95 }
96
97 override void Simulate(float timeDelta)
98 {
99 //time = time + timeDelta;
100 //Print("B2");
101 }
102
104 {
105 //Print(time);
106 };
107
108 //void OnMessage(AIMessage message)
109 //{
110 //int ID = message.GetTypeNameCRC();
111 //Print(ID);
112
113 //}
114};
115
117{
120
121 private void AIBehaviourHLDataZombie2() {}
123
124 override void OnParseConfig()
125 {
126 Print("zombie data parse config start");
127
128 ParseBehaviourSlot("Calm");
129 ParseBehaviourSlot("Attracted");
130 ParseBehaviourSlot("Disturbed");
131 ParseBehaviourSlot("Alerted");
132
133 ParseAlertLevel("Calm");
134 ParseAlertLevel("Disturbed");
135 ParseAlertLevel("Attracted");
136 ParseAlertLevel("Alerted");
137
138 m_fDamageToCrawl = ReadParamValue("damageToCrawl", 0.01);
139 m_fCrawlProbability = ReadParamValue("crawlProbability", 0.01);
140
141 Print("zombie data parse config end");
142 }
143};
144
145//NewNPC(model,behname,....)
146
void OnDamage(float damage, EntityAI source)
Definition AIBehaviour.c:61
proto native void SwitchToNextBehaviour()
AIBehaviourHLZombie2 AIBehaviourHL
Definition AIBehaviour.c:44
void OnInit()
Definition AIBehaviour.c:49
void OnDamageInflicted()
Definition AIBehaviour.c:63
proto native AIBehaviourHLData GetTemplateData()
static proto void RegAIBehaviour(string behname, typename behClass, typename behClassData)
void ~AIBehaviourHL()
Definition AIBehaviour.c:45
void OnAnimationEvent(int nameCrc)
Definition AIBehaviour.c:64
proto native void SetNextBehaviour(int BehaviourCrc)
void Simulate(float timeDelta)
Definition AIBehaviour.c:53
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native void ParseBehaviourSlot(string name)
void AIBehaviourHLData()
Definition AIBehaviour.c:28
void ~AIBehaviourHLData()
Definition AIBehaviour.c:29
proto native float ReadParamValue(string paramName, float defValue)
proto native void ParseAlertLevel(string name)
override void OnParseConfig()
override void OnInit()
Definition AIBehaviour.c:87
AIBehaviourHLDataZombie2 GetData()
Definition AIBehaviour.c:79
override void Simulate(float timeDelta)
Definition AIBehaviour.c:97
proto void Print(void var)
Prints content of variable to console/log.