11 proto
bool IsType(
int varIndex,
typename type);
12 proto
bool Get(
int varIndex, out
void val);
551 proto native external
bool AddChild(notnull
IEntity child,
int pivot,
bool positionOnly =
false);
743 proto native external
int Animate(
float speed,
int loop);
766#ifdef COMPONENT_SYSTEM
774proto native
void SetFixedLOD(
IEntity ent,
int lod);
778proto native
void SetRenderView(
IEntity ent,
int cam_index,
int width,
int height);
779proto
void GetRenderView(
IEntity ent, out
int cam_index, out
int width, out
int height);
794 void ParamEnum(
string key,
string value,
string desc =
"")
802class ParamEnumArray:
array<ref ParamEnum>
804 static ParamEnumArray
FromEnum(
typename e)
806 ParamEnumArray params =
new ParamEnumArray();
807 int cnt = e.GetVariableCount();
810 for (
int i = 0; i < cnt; i++)
812 if (e.GetVariableType(i) ==
int && e.GetVariableValue(NULL, i, val))
814 params.Insert(
new ParamEnum(e.GetVariableName(i), val.ToString()));
831 void Attribute(
string defvalue,
string uiwidget,
string desc =
"",
string rangescale =
"", ParamEnumArray enums = NULL)
854 void EditorAttribute(
string style,
string category,
string description,
vector sizeMin,
vector sizeMax,
string color,
string color2 =
"0 0 0 0",
bool visible =
true,
bool insertable =
true,
bool dynamicBox =
false)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
protected void EOnDummy023(IEntity other, int extra)
Placeholder.
proto native external owned string GetName()
proto external vector GetLocalPosition()
Returns local position of Entity.
protected void EOnDummy026(IEntity other, int extra)
Placeholder.
proto native external vector GetTransformAxis(int axis)
Returns one row of Entity transformation matrix.
proto native external EntityEvent ClearEventMask(EntityEvent e)
Clears event mask.
proto native external void SetAngles(vector angles)
Same as SetYawPitchRoll, but sets rotation around X, Y and Z axis.
proto native WidgetSource GetParent()
proto native external void SetObject(vobject object, string options)
event protected void EOnPhysicsMove(IEntity other, int extra)
EntityEvent.PHYSICSMOVE.
event protected void EOnNotVisible(IEntity other, int extra)
EntityEvent.NOTVISIBLE.
proto external volatile void SendEvent(notnull IEntity actor, EntityEvent e, void extra)
Dynamic event invokation. Parameters are the same as in IEntity::EOnXXXX() methods.
event protected void EOnContact(IEntity other, Contact extra)
EntityEvent.CONTACT.
proto native IEntity GetParent()
Returns pointer to parent Entity in hierarchy.
event protected void EOnEnter(IEntity other, int extra)
EntityEvent.ENTER.
ref ParamEnumArray m_Enums
Only ints and floats are currently supported. Array can be defined this way: { ParamEnum("Choice 1",...
protected void EOnDummy020(IEntity other, int extra)
Placeholder.
proto native external EntityEvent GetEventMask()
Returns current event mask.
class Attribute m_Style
can be "box", "sphere", "cylinder", "pyramid", "diamond" or custom style name
event protected int EOnVisible(IEntity other, int extra)
EntityEvent.VISIBLE.
proto native void SetName(string name)
proto native int GetID()
Return unique entity ID.
proto native external void SetYawPitchRoll(vector angles)
Sets angles for entity (Yaw, Pitch, Roll)
proto native external EntityFlags ClearFlags(EntityFlags flags, bool recursively)
Clear Entity flags. Returns cleared flags.
protected void EOnDummy030(IEntity other, int extra)
Placeholder.
event protected void EOnAnimEvent(IEntity other, AnimEvent extra)
EntityEvent.ANIMEVENT.
proto native external vector VectorToParent(vector vec)
Transforms local vector to world space.
proto bool Get(int varIndex, out void val)
proto native external float GetScale()
proto native external vector GetLocalYawPitchRoll()
Returns local orientation when it's in hierarchy (Yaw, Pitch, Roll)
event protected void EOnFrame(IEntity other, float timeSlice)
EntityEvent.FRAME.
event protected void EOnJointBreak(IEntity other, int extra)
EntityEvent.JOINTBREAK.
proto native external vector GetAngles()
Same as GetYawPitchRoll, but returns rotation vector around X, Y and Z axis.
proto native external int AnimateEx(float speed, int loop, out vector lin, out vector ang)
Updates animation (either xob, or particle, whatever)
proto external void GetRenderTransform(out vector mat[])
Returns render transformation of Entity. Must pass in vector array size of 4.
proto native vobject GetVObject()
Returns visual object set to this Entity. No reference is added.
proto external void GetWorldBounds(out vector mins, out vector maxs)
Returns quantized world-bound-box of Entity.
string m_Category
folder structure eg. StaticEntities/Walls
proto native owned string GetClassName()
protected void EOnDummy031(IEntity other, int extra)
Placeholder.
event protected void EOnSimulate(IEntity other, float dt)
EntityEvent.SIMULATE.
proto native external vector GetYawPitchRoll()
Returns orientation of Entity in world space (Yaw, Pitch, Roll)
protected void EOnDummy022(IEntity other, int extra)
Placeholder.
proto native external vector CoordToLocal(vector coord)
Transforms world space position to local space.
event protected void EOnTouch(IEntity other, int extra)
EntityEvent.TOUCH.
protected void EOnDummy021(IEntity other, int extra)
Placeholder.
proto native void SetID(int id)
Set unique entity ID.
protected void EOnDummy027(IEntity other, int extra)
Placeholder.
void Attribute(string defvalue, string uiwidget, string desc="", string rangescale="", ParamEnumArray enums=NULL)
proto native external EntityFlags GetFlags()
Returns Entity flags.
event protected void EOnPostFrame(IEntity other, int extra)
EntityEvent.POSTFRAME.
event protected void EOnExtra(IEntity other, int extra)
EntityEvent.EXTRA.
proto native external int SetCameraMask(int mask)
Sets visibility mask for cameras, where Entity will be rendered.
event protected void EOnLeave(IEntity other, int extra)
EntityEvent.LEAVE.
void ParamEnum(string key, string value, string desc="")
proto native int VarIndex(string varName)
proto native WidgetSource GetSibling()
proto native owned string GetName()
string m_UiWidget
can be "editbox", "combobox", "spinbox", "slider", "font", "fileeditbox", "colorPicker",...
protected void EOnDummy025(IEntity other, int extra)
Placeholder.
event protected void EOnWorldProcess(IEntity other, int extra)
EntityEvent.WORLDPROCESS.
proto native external void SetOrigin(vector orig)
Sets origin for entity.
proto native external vector VectorToLocal(vector vec)
Transforms world space vector to local space.
proto native external vector GetOrigin()
Returns origin of Entity.
string m_Description
class purpose description
proto native external EntityFlags SetFlags(EntityFlags flags, bool recursively)
Sets Entity flags. It's OR operation, not rewrite. Returns previous flags.
proto native WidgetSource GetChildren()
ParamEnum Managed FromEnum(typename e)
proto native external bool AddChild(notnull IEntity child, int pivot, bool positionOnly=false)
Adds child entity to this entity.
EntityEvent
Entity events for event-mask, or throwing event from code.
proto native external vector GetLocalAngles()
Same as GetLocalYawPitchRoll, but returns rotation vector around X, Y and Z axis.
protected void EOnDummy029(IEntity other, int extra)
Placeholder.
proto native IEntity GetChildren()
Returns pointer to first child Entity in hierarchy.
protected void EOnDummy024(IEntity other, int extra)
Placeholder.
string m_RangeScale
defined as "MIN_VALUE MAX_VALUE STEP" eg. "1 100 0.5"
proto native external bool RemoveChild(notnull IEntity child, bool keepTransform=false)
Removes child entity from hierarchy.
proto native external vector CoordToParent(vector coord)
Transforms local position to world space.
proto native IEntitySource GetParent()
protected void EOnUser1(IEntity other, int extra)
EntityEvent.EV_USER+1.
proto native int GetHierarchyPivot()
Returns the hierarchy component pivot.
proto external void GetTransform(out vector mat[])
Returns transformation of Entity. It returns only so much vectors as array is big.
proto native bool IsVariableSet(int varIndex)
proto native external void SetScale(float scale)
proto native external int Update()
event protected void EOnPostSimulate(IEntity other, float timeSlice)
EntityEvent.POSTSIMULATE.
proto native IEntitySource GetChildren()
proto native IEntitySource GetSibling()
protected void EOnDummy028(IEntity other, int extra)
Placeholder.
event protected void EOnSoundEvent(IEntity other, SoundEvent extra)
EntityEvent.SOUNDEVENT.
proto external void GetLocalTransform(out vector mat[])
Returns local transformation of Entity. It returns only so much vectors as array is big.
protected void EOnUser4(IEntity other, int extra)
EntityEvent.EV_USER+4.
proto external void GetBounds(out vector mins, out vector maxs)
Returns local bounding box of model on Entity.
proto native external void SetTransform(vector mat[4])
Sets entity transformation.
event protected void EOnInit(IEntity other, int extra)
EntityEvent.INIT.
proto bool IsType(int varIndex, typename type)
proto native external bool IsFlagSet(EntityFlags flags)
Test if one or more of specified flags are set.
vector m_SizeMax
max vector of a bounding box
proto native IEntity GetSibling()
Returns pointer to next child Entity on the same hierarchy.
proto native external EntityEvent SetEventMask(EntityEvent e)
Sets event mask.
void EditorAttribute(string style, string category, string description, vector sizeMin, vector sizeMax, string color, string color2="0 0 0 0", bool visible=true, bool insertable=true, bool dynamicBox=false)
protected void EOnUser0(IEntity other, int extra)
EntityEvent.EV_USER+0.
proto native external void FilterNextTrace()
When called, the Entity is excluded from consequent TraceMove/TraceLine.
vector m_SizeMin
min vector of a bounding box
proto native bool IsHierarchyPositionOnly()
Returns if the hierarchy component was created with positionOnly.
proto native external int Animate(float speed, int loop)
Updates animation (either xob, or particle, whatever)
@ TOUCH
entity was touched by other entity
@ ENTER
Object entered Trigger.
@ LEAVE
Object left Trigger.
@ TRIGGER
Is not collidable, but invokes touch events.
@ SOLID
Is collidable by various trace methods.
@ WATER
Used by tracing methods. Traceable only with flag TraceFlags.WATER.
@ USER1
Flags for custom usage and filterings.
@ TOUCHTRIGGERS
Interacts with triggers.
@ FEATURE
Scene rendering hint for dominant objects that are not culled by standard way.
@ STATIC
Static objects are included in the query.
@ SYNCHRONIZATION_DIRTY
Entity wants to synchronize (network)