Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CustomTriggerConditionsSpecificClassNameCount.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "If SPECIFIC_CLASS is selected, fill the class name here.", category: "Trigger")]
5 ref array<string> m_aSpecificClassNames;
6
7 [Attribute(defvalue: "1", desc: "How many entities of specific prefab are requiered to be inside the trigger", params: "0 100000 1", category: "Trigger")]
8 int m_iClassnameCount;
9
10 //------------------------------------------------------------------------------------------------
13 override void Prepare(IEntity entity)
14 {
16 if (!trigger)
17 return;
18
19 trigger.SetSpecificClassName(m_aSpecificClassNames);
20
21 typename type;
22 foreach (string className : m_aSpecificClassNames)
23 {
24 type = className.ToType();
25 if (type)
26 trigger.AddClassType(type);
27 }
28 }
29
30 //------------------------------------------------------------------------------------------------
33 override bool Init(IEntity entity)
34 {
36 if (!trigger)
37 return true;
38
39 bool triggerStatus;
40 foreach (string className : m_aSpecificClassNames)
41 {
42 if (trigger.GetSpecificClassCountInsideTrigger(className) >= m_iClassnameCount)
43 {
44 triggerStatus = true;
45 }
46 else
47 {
48 triggerStatus = false;
49 break;
50 }
51 }
52
53 return triggerStatus;
54 }
55}
override void Init()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SetSpecificClassName(notnull array< string > aClassName)
Sets specific classnames to be searched in the trigger.
int GetSpecificClassCountInsideTrigger(string className, int targetCount=-1)
Returns number of specific class that is inside of this trigger.
SCR_FieldOfViewSettings Attribute