Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LifetimeComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted", description: "")]
5
7class SCR_LifetimeComponent : ScriptComponent
8{
9 [Attribute(defvalue: "1")]
10 protected float m_fLifeTime;
11
12 //------------------------------------------------------------------------------------------------
13 override void EOnFrame(IEntity owner, float timeSlice)
14 {
15 if (m_fLifeTime < 0)
16 {
17 SCR_EntityHelper.DeleteEntityAndChildren(owner);
18 return;
19 }
20 m_fLifeTime -= timeSlice;
21 }
22
23 //------------------------------------------------------------------------------------------------
24 override void OnPostInit(IEntity owner)
25 {
26 SetEventMask(owner, EntityEvent.FRAME);
27 }
28}
float m_fLifeTime
The lifetime in seconds.
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
proto external int SetEventMask(notnull IEntity owner, int mask)
void EOnFrame(IEntity owner, float timeSlice)
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
Definition EntityEvent.c:14