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