24 const int TIMEOUT = 1000;
57 int timeStamp =
g_Game.GetTime();
59 for(
int n = 0; n < m_insiders.Count(); )
62 if(ins.insider == NULL)
69 int timeDiff = timeStamp - ins.timeStamp;
70 if(timeDiff > timeout)
85 for(
int n = 0; n < m_insiders.Count(); n++)
87 ins = m_insiders.Get(n);
89 if(ins.insider.Ptr() == obj)
92 ins.timeStamp =
g_Game.GetTime();
97 ins.timeStamp =
g_Game.GetTime();
98 m_insiders.Insert(ins);
110 if (
Class.CastTo(obj, other))
117 for(
int n = 0; n < 3; n++)
119 float m1 =
Math.AbsFloat(min[n]);
120 float m2 =
Math.AbsFloat(max[n]);
149 shape.SetMatrix(mat);
157 const vector mins =
"-2 -4 -2";
158 const vector maxs =
"2 4 2";
159 SetExtents(mins, maxs);
164 super.EEDelete(parent);
179 override void OnEnter(
Object obj)
186 if(
Class.CastTo(obj, other))
197 override void EOnInit(
IEntity other,
int extra)
199 const vector mins =
"-2 -2 -2";
200 const vector maxs =
"2 2 2";
void SetExtents(vector mins, vector maxs)
Super root of all classes in Enforce script.
Trigger only accepting Object which IsMan()
override void EEDelete(EntityAI parent)
void AddInsider(Object obj)
float GetRadius(vector min, vector max)
void SetExtents(vector mins, vector maxs)
override void EOnFrame(IEntity other, float timeSlice)
void UpdateInsiders(int timeout)
override void EOnInit(IEntity other, int extra)
override void EOnTouch(IEntity other, int extra)
override void OnLeave(Object obj)
void UpdateInsiders(int timeout)
void AddInsider(Object obj)
Adding of new TriggerInsider.
The object which is in a trigger and its metadata.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override void EOnTouch(IEntity other, int extra)
proto void Print(void var)
Prints content of variable to console/log.
proto native void SetFlags(ShapeFlags flags)
EntityEvent
Entity events for event-mask, or throwing event from code.
proto native void SetCollisionBox(vector mins, vector maxs)
Sets collision box for object.