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);
745 proto native external
int Animate(
float speed,
int loop);
768#ifdef COMPONENT_SYSTEM
776proto native
void SetFixedLOD(
IEntity ent,
int lod);
780proto native
void SetRenderView(
IEntity ent,
int cam_index,
int width,
int height);
781proto
void GetRenderView(
IEntity ent, out
int cam_index, out
int width, out
int height);
796 void ParamEnum(
string key,
string value,
string desc =
"")
804class ParamEnumArray:
array<ref ParamEnum>
806 static ParamEnumArray
FromEnum(
typename e)
808 ParamEnumArray params =
new ParamEnumArray();
809 int cnt = e.GetVariableCount();
812 for (
int i = 0; i < cnt; i++)
814 if (e.GetVariableType(i) ==
int && e.GetVariableValue(NULL, i, val))
816 params.Insert(
new ParamEnum(e.GetVariableName(i), val.ToString()));
833 void Attribute(
string defvalue,
string uiwidget,
string desc =
"",
string rangescale =
"", ParamEnumArray enums = NULL)
856 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
Internal ancestor of all Entity implementations.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native external owned string GetName()
void EOnPostFrame(IEntity other, int extra)
EntityEvent.POSTFRAME.
proto external vector GetLocalPosition()
Returns local position of Entity.
void EOnEnter(IEntity other, int extra)
EntityEvent.ENTER.
proto native external Physics GetPhysics()
void EOnDummy024(IEntity other, int extra)
Placeholder.
proto native external vector GetTransformAxis(int axis)
Returns one row of Entity transformation matrix.
void EOnSoundEvent(IEntity other, SoundEvent extra)
EntityEvent.SOUNDEVENT.
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)
int EOnVisible(IEntity other, int extra)
EntityEvent.VISIBLE.
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 IEntity GetParent()
Returns pointer to parent Entity in hierarchy.
void EOnDummy022(IEntity other, int extra)
Placeholder.
ref ParamEnumArray m_Enums
Only ints and floats are currently supported. Array can be defined this way: { ParamEnum("Choice 1",...
void EOnFrame(IEntity other, float timeSlice)
EntityEvent.FRAME.
void EOnWorldProcess(IEntity other, int extra)
EntityEvent.WORLDPROCESS.
proto native external EntityEvent GetEventMask()
Returns current event mask.
class Attribute m_Style
can be "box", "sphere", "cylinder", "pyramid", "diamond" or custom style name
proto native void SetName(string name)
proto native int GetID()
Return unique entity ID.
void EOnDummy023(IEntity other, int extra)
Placeholder.
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.
void EOnDummy031(IEntity other, int extra)
Placeholder.
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()
void EOnDummy025(IEntity other, int extra)
Placeholder.
void EOnDummy021(IEntity other, int extra)
Placeholder.
void EOnContact(IEntity other, Contact extra)
EntityEvent.CONTACT.
void EOnTouch(IEntity other, int extra)
EntityEvent.TOUCH.
proto native external vector GetLocalYawPitchRoll()
Returns local orientation when it's in hierarchy (Yaw, Pitch, Roll).
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.
proto native vobject GetVObject()
Returns visual object set to this Entity.
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()
void EOnNotVisible(IEntity other, int extra)
EntityEvent.NOTVISIBLE.
proto native external vector GetYawPitchRoll()
Returns orientation of Entity in world space (Yaw, Pitch, Roll).
void EOnDummy026(IEntity other, int extra)
Placeholder.
proto native external vector CoordToLocal(vector coord)
Transforms world space position to local space.
void EOnExtra(IEntity other, int extra)
EntityEvent.EXTRA.
proto native void SetID(int id)
Set unique entity ID.
void Attribute(string defvalue, string uiwidget, string desc="", string rangescale="", ParamEnumArray enums=NULL)
proto native external EntityFlags GetFlags()
Returns Entity flags.
void EOnUser1(IEntity other, int extra)
EntityEvent.EV_USER+1.
proto native external int SetCameraMask(int mask)
Sets visibility mask for cameras, where Entity will be rendered.
void ParamEnum(string key, string value, string desc="")
void EOnDummy027(IEntity other, int extra)
Placeholder.
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",...
proto native external void SetOrigin(vector orig)
Sets origin for entity.
void EOnDummy029(IEntity other, int extra)
Placeholder.
proto native external vector VectorToLocal(vector vec)
Transforms world space vector to local space.
void EOnPostSimulate(IEntity other, float timeSlice)
EntityEvent.POSTSIMULATE.
proto native external vector GetOrigin()
Returns origin of Entity.
string m_Description
class purpose description
void EOnSimulate(IEntity other, float dt)
EntityEvent.SIMULATE.
proto native external EntityFlags SetFlags(EntityFlags flags, bool recursively)
Sets Entity flags.
proto native WidgetSource GetChildren()
void EOnAnimEvent(IEntity other, AnimEvent extra)
EntityEvent.ANIMEVENT.
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.
void EOnPhysicsMove(IEntity other, int extra)
EntityEvent.PHYSICSMOVE.
proto native external vector GetLocalAngles()
Same as GetLocalYawPitchRoll, but returns rotation vector around X, Y and Z axis.
proto native IEntity GetChildren()
Returns pointer to first child Entity in hierarchy.
void EOnJointBreak(IEntity other, int extra)
EntityEvent.JOINTBREAK.
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()
proto native int GetHierarchyPivot()
Returns the hierarchy component pivot.
proto external void GetTransform(out vector mat[])
Returns transformation of Entity.
proto native bool IsVariableSet(int varIndex)
void EOnInit(IEntity other, int extra)
EntityEvent.INIT.
proto native external void SetScale(float scale)
proto native external int Update()
proto native IEntitySource GetChildren()
proto native IEntitySource GetSibling()
proto external void GetLocalTransform(out vector mat[])
Returns local transformation of Entity.
void EOnDummy020(IEntity other, int extra)
Placeholder.
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.
void EOnDummy028(IEntity other, int extra)
Placeholder.
void EOnDummy030(IEntity other, int extra)
Placeholder.
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
void EOnUser4(IEntity other, int extra)
EntityEvent.EV_USER+4.
proto native IEntity GetSibling()
Returns pointer to next child Entity on the same hierarchy.
void EOnLeave(IEntity other, int extra)
EntityEvent.LEAVE.
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)
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).
@ INIT
event called after the world is created, including all entities other WorldClass
@ FRAME
new frame event, called each frame other WorldClass extra frame index
@ NOTVISIBLE
entity is not visible, will not be part of rendering other WorldClass extra frame index
@ TOUCH
entity was touched by other entity
@ ENTER
Object entered Trigger.
@ POSTFRAME
event at the end of each frame or when entity is moved during the frame other WorldClass
@ 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.
@ TRANSLUCENT
Used by tracing methods.
@ TOUCHTRIGGERS
Interacts with triggers.
@ FEATURE
Scene rendering hint for dominant objects that are not culled by standard way.
@ STATIC
Tells that this entity will represent mostly static object, so we can use more precise but slower met...
@ SYNCHRONIZATION_DIRTY
Entity wants to synchronize (network).
@ ACTIVE
body is simulated