Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EffectModuleAreaMeshComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/Area Mesh", description: "")]
5class SCR_EffectsModuleAreaMeshComponent: SCR_BaseAreaMeshComponent
6{
7 [Attribute("10")]
8 protected float m_fWidth;
9
10 [Attribute("10")]
11 protected float m_fLenght;
12
13 //------------------------------------------------------------------------------------------------
14 override void GetDimensions2D(out float width, out float length)
15 {
16 width = m_fWidth;
17 length = m_fLenght;
18 }
19
20 //------------------------------------------------------------------------------------------------
21 override void EOnInit(IEntity owner)
22 {
24 if (!effectModule && owner.GetParent())
26
27 if (!effectModule)
28 {
29 Print("'SCR_EffectsModuleAreaMeshComponent' Component must be attached to entity with SCR_EffectsModuleComponent!", LogLevel.ERROR);
30 return;
31 }
32
33 SCR_EffectsModule effectModuleData = effectModule.GetEffectsModuleConfig();
34 if (!effectModuleData)
35 {
36 Print("'SCR_EffectsModuleAreaMeshComponent' SCR_EffectsModuleComponent has no SCR_EffectsModule assinged!", LogLevel.ERROR);
37 return;
38 }
39
41 if (radiusData)
42 {
43 if (m_fWidth != radiusData.GetRadius() || m_fLenght != radiusData.GetRadius())
44 {
45 Print("'SCR_EffectsModuleAreaMeshComponent' has width and/or lenght that is not set equal to the radius of the effect module!", LogLevel.ERROR);
46 m_fWidth = radiusData.GetRadius();
48 }
49
51 return;
52 }
53
55 if (rectangleData)
56 {
57 float width, lenght;
58 rectangleData.GetDimensions2D(width, lenght);
59
60 if (m_fWidth != width || m_fLenght != lenght)
61 {
62 Print("'SCR_EffectsModuleAreaMeshComponent' (Square) has width and/or lenght that is not set equal to the width and/or lenght of the effect module!", LogLevel.ERROR);
63 m_fWidth = width;
64 m_fLenght = lenght;
65 }
66
67
69 return;
70 }
71
72 Print("'SCR_EffectsModuleAreaMeshComponent' SCR_EffectsModuleComponent has invalid 'SCR_BaseEffectsModulePositionData' which is not supported for the AreaMesh Generation!", LogLevel.ERROR);
73 }
74};
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
void GenerateAreaMesh()
Generate area mesh based on its settings.
proto external Managed FindComponent(typename typeName)
proto external IEntity GetParent()
override void GetDimensions2D(out float width, out float length)
SCR_BaseEffectsModulePositionData GetEffectsModuleZoneData()
void GetDimensions2D(out float width, out float lenght)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute