Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SpecialCollisionHandlerComponent.c
Go to the documentation of this file.
2{
3 [Attribute()]
4 protected ref array<ref SCR_SpecialCollisionDamageEffect> m_aSpecialCollisions;
5
6 [Attribute(desc: "Value used to set the SpecialContact signal which is used by audio. If left at 0 contact with this entity will not alter the signal.", params: "0 inf")]
7 protected int m_iContactType;
8
9 [Attribute("0", desc: "Value used to set the SpecialContactEntityHeight signal.\nWhen set to 0 then height is calculated from entity bounding box", params: "0 inf")]
10 protected float m_fContactHeightOverride;
11
12 //------------------------------------------------------------------------------------------------
13 // Add all damage effects on this component to given array
14 void GetSpecialCollisionDamageEffects(notnull inout array<SCR_SpecialCollisionDamageEffect> damageEffects)
15 {
17 {
18 damageEffects.Insert(damageEffect)
19 }
20 }
21
22 //------------------------------------------------------------------------------------------------
24 {
25 return m_iContactType;
26 }
27
28 //------------------------------------------------------------------------------------------------
33
34 //------------------------------------------------------------------------------------------------
37 void SetContactHeight(float height)
38 {
40 }
41}
42
43class SCR_SpecialCollisionHandlerComponent : ScriptComponent
44{
45 //------------------------------------------------------------------------------------------------
46 float GetContactHeight()
47 {
48 IEntity owner = GetOwner();
50 if (!data)
51 return 0;
52
53 if (data.GetContactHeightOverride() > 0)
54 return data.GetContactHeightOverride();
55
56 vector mins, maxs;
57 owner.GetBounds(mins, maxs);
58 float newHeight = maxs[1] - mins[1];
59 data.SetContactHeight(newHeight);
60 return newHeight;
61 }
62
63 //------------------------------------------------------------------------------------------------
65
67 void OnContactStart(notnull SCR_ChimeraCharacter character);
68
69 //------------------------------------------------------------------------------------------------
71
73 void OnContactEnd(notnull SCR_ChimeraCharacter character);
74}
SCR_AntiPersonnelMineCollisionHandlerComponentClass SCR_SpecialCollisionHandlerComponentClass OnContactStart(notnull SCR_ChimeraCharacter character)
SCR_CharacterSoundComponentClass GetComponentData()
Get all prefabs that have the spawner data
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void OnContactEnd(notnull SCR_ChimeraCharacter character)
SCR_SpecialCollisionHandlerComponentClass ScriptComponentClass GetContactHeight()
proto external void GetBounds(out vector mins, out vector maxs)
ref array< ref SCR_SpecialCollisionDamageEffect > m_aSpecialCollisions
void GetSpecialCollisionDamageEffects(notnull inout array< SCR_SpecialCollisionDamageEffect > damageEffects)
proto external GenericEntity GetOwner()
Get owner entity.
SCR_FieldOfViewSettings Attribute