Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
aibehaviour.c
Go to the documentation of this file.
1
6
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
26
class
AIBehaviourHLData
27
{
28
private
void
AIBehaviourHLData
() {}
29
private
void
~AIBehaviourHLData
() {}
30
31
//void ParseConfig(ParamEntryPar param, AIWorld* world, AIAgentTemplate* agentTemplate) {};
32
void
OnParseConfig
();
33
34
//Can be use only inside OnParseConfig function
35
proto native
void
ParseBehaviourSlot
(
string
name
);
36
proto native
void
ParseAlertLevel
(
string
name
);
37
proto native
float
ReadParamValue
(
string
paramName,
float
defValue);
38
39
}
40
41
42
class
AIBehaviourHL
43
{
44
private
void
AIBehaviourHL
() {}
45
private
void
~AIBehaviourHL
() {}
46
47
proto native
AIBehaviourHLData
GetTemplateData
();
48
49
void
OnInit
(){};
50
//private void AIBehaviourHL_script() {};
51
//private void ~AIBehaviourHL_script() {};
52
53
void
Simulate
(
float
timeDelta)
54
{
55
//time = time + timeDelta;
56
//Print("A2");
57
}
58
59
60
//void OnNoise(AINoiseInfo noise, EntityAI source){}
61
void
OnDamage
(
float
damage,
EntityAI
source){}
62
63
void
OnDamageInflicted
(){}
64
void
OnAnimationEvent
(
int
nameCrc){}
65
//void OnMessage(AIMessage message){}
66
//void OnBehaviourSwitched(AIBehaviour* behaviour){}
67
proto native
void
SetNextBehaviour
(
int
BehaviourCrc);
68
proto native
void
SwitchToNextBehaviour
();
69
70
static
proto
void
RegAIBehaviour
(
string
behname,
typename
behClass,
typename
behClassData);
71
};
72
73
74
class
AIBehaviourHLZombie2
:
AIBehaviourHL
75
{
76
//AIBehaviourHLDataZombie2 data;
77
//int state;
78
//float time;
79
AIBehaviourHLDataZombie2
GetData
()
80
{
81
return
AIBehaviourHLDataZombie2
.Cast(
GetTemplateData
() );
82
}
83
84
private
void
AIBehaviourHLZombie2
() {}
85
private
void
~AIBehaviourHLZombie2
() {}
86
87
override
void
OnInit
()
88
{
89
SetNextBehaviour
(0x7b9a4ee9);
90
SwitchToNextBehaviour
();
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
103
void
ShowDebugInfo
()
104
{
105
//Print(time);
106
};
107
108
//void OnMessage(AIMessage message)
109
//{
110
//int ID = message.GetTypeNameCRC();
111
//Print(ID);
112
113
//}
114
};
115
116
class
AIBehaviourHLDataZombie2
:
AIBehaviourHLData
117
{
118
float
m_fDamageToCrawl
;
119
float
m_fCrawlProbability
;
120
121
private
void
AIBehaviourHLDataZombie2
() {}
122
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
147
OnDamage
void OnDamage(float damage, EntityAI source)
Definition
aibehaviour.c:61
SwitchToNextBehaviour
proto native void SwitchToNextBehaviour()
AIBehaviourHL
AIBehaviourHLZombie2 AIBehaviourHL
Definition
aibehaviour.c:44
OnDamageInflicted
void OnDamageInflicted()
Definition
aibehaviour.c:63
GetTemplateData
proto native AIBehaviourHLData GetTemplateData()
RegAIBehaviour
static proto void RegAIBehaviour(string behname, typename behClass, typename behClassData)
~AIBehaviourHL
void ~AIBehaviourHL()
Definition
aibehaviour.c:45
OnAnimationEvent
void OnAnimationEvent(int nameCrc)
Definition
aibehaviour.c:64
SetNextBehaviour
proto native void SetNextBehaviour(int BehaviourCrc)
Simulate
void Simulate(float timeDelta)
Definition
aibehaviour.c:53
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
AIBehaviourHLData
Definition
aibehaviour.c:27
AIBehaviourHLData::ParseBehaviourSlot
proto native void ParseBehaviourSlot(string name)
AIBehaviourHLData::ParseAlertLevel
proto native void ParseAlertLevel(string name)
AIBehaviourHLData::ReadParamValue
proto native float ReadParamValue(string paramName, float defValue)
AIBehaviourHLData::AIBehaviourHLData
void AIBehaviourHLData()
Definition
aibehaviour.c:28
AIBehaviourHLData::~AIBehaviourHLData
void ~AIBehaviourHLData()
Definition
aibehaviour.c:29
AIBehaviourHLData::OnParseConfig
void OnParseConfig()
AIBehaviourHLDataZombie2
Definition
aibehaviour.c:117
AIBehaviourHLDataZombie2::m_fDamageToCrawl
float m_fDamageToCrawl
Definition
aibehaviour.c:118
AIBehaviourHLDataZombie2::~AIBehaviourHLDataZombie2
void ~AIBehaviourHLDataZombie2()
Definition
aibehaviour.c:122
AIBehaviourHLDataZombie2::OnParseConfig
override void OnParseConfig()
Definition
aibehaviour.c:124
AIBehaviourHLDataZombie2::AIBehaviourHLDataZombie2
void AIBehaviourHLDataZombie2()
Definition
aibehaviour.c:121
AIBehaviourHLDataZombie2::m_fCrawlProbability
float m_fCrawlProbability
Definition
aibehaviour.c:119
AIBehaviourHLZombie2::OnInit
override void OnInit()
Definition
aibehaviour.c:87
AIBehaviourHLZombie2::ShowDebugInfo
void ShowDebugInfo()
Definition
aibehaviour.c:103
AIBehaviourHLZombie2::GetData
AIBehaviourHLDataZombie2 GetData()
Definition
aibehaviour.c:79
AIBehaviourHLZombie2::~AIBehaviourHLZombie2
void ~AIBehaviourHLZombie2()
Definition
aibehaviour.c:85
AIBehaviourHLZombie2::AIBehaviourHLZombie2
void AIBehaviourHLZombie2()
Definition
aibehaviour.c:84
AIBehaviourHLZombie2::Simulate
override void Simulate(float timeDelta)
Definition
aibehaviour.c:97
EntityAI
Definition
inventoryitem.c:2
Print
proto void Print(void var)
Prints content of variable to console/log.
OnInit
void OnInit()
Callback for user defined initialization. Called for all suites during TestHarness....
Definition
freezestate.c:81
Games
Dayz
scripts
3_game
aibehaviour.c
Generated by
1.17.0