DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Entity editor attribute system

Структуры данных

class  IEntity
 
class  ParamEnum
 
class  Attribute
 

Перечисления

enum  EntityEvent {
  TOUCH , VISIBLE , NOTVISIBLE , FRAME ,
  POSTFRAME , INIT , JOINTBREAK , SIMULATE ,
  POSTSIMULATE , PHYSICSMOVE , CONTACT , EXTRA ,
  ANIMEVENT , SOUNDEVENT , PHYSICSSTEADY , USER ,
  ENTER , LEAVE , ALL
}
 Entity events for event-mask, or throwing event from code. Подробнее...
 
enum  EntityFlags {
  VISIBLE , SOLID , TRIGGER , TOUCHTRIGGERS ,
  SYNCHRONIZATION_DIRTY , FEATURE , TRANSLUCENT , WATER ,
  ACTIVE , STATIC , USER1 , USER2 ,
  USER3 , USER4 , USER5 , USER6
}
 Entity flags. Подробнее...
 

Функции

proto native owned string GetClassName ()
 
proto native owned string GetName ()
 
proto native int VarIndex (string varName)
 
proto native bool IsVariableSet (int varIndex)
 
proto bool IsType (int varIndex, typename type)
 
proto bool Get (int varIndex, out void val)
 
proto native IEntitySource GetChildren ()
 
proto native IEntitySource GetSibling ()
 
proto native IEntitySource GetParent ()
 
proto native WidgetSource GetChildren ()
 
proto native WidgetSource GetSibling ()
 
proto native WidgetSource GetParent ()
 
void ParamEnum (string key, string value, string desc="")
 
ParamEnum Managed FromEnum (typename e)
 
void ParamEnum (string key, string value, string desc="")
 
void Attribute (string defvalue, string uiwidget, string desc="", string rangescale="", ParamEnumArray enums=NULL)
 
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)
 

Переменные

string m_Key
 
string m_Value
 
string m_Desc
 
string m_Key
 
string m_Value
 
string m_Desc
 
string m_DefValue
 
string m_UiWidget
 can be "editbox", "combobox", "spinbox", "slider", "font", "fileeditbox", "colorPicker", "flags", "resourceNamePicker"
 
string m_RangeScale
 defined as "MIN_VALUE MAX_VALUE STEP" eg. "1 100 0.5"
 
string m_Desc
 
ref ParamEnumArray m_Enums
 Only ints and floats are currently supported. Array can be defined this way: { ParamEnum("Choice 1", "1"), ParamEnum("Choicen 2", "2") }.
 
class Attribute m_Style
 can be "box", "sphere", "cylinder", "pyramid", "diamond" or custom style name
 
string m_Category
 folder structure eg. StaticEntities/Walls
 
string m_Description
 class purpose description
 
vector m_SizeMin
 min vector of a bounding box
 
vector m_SizeMax
 max vector of a bounding box
 
string m_Color
 
string m_Color2
 
bool m_Visible
 
bool m_Insertable
 
bool m_DynamicBox
 

Event methods

Event method stubs. Reimplement these in inherited entities to receive event calls

void EOnTouch (IEntity other, int extra)
 EntityEvent.TOUCH.
 
void EOnInit (IEntity other, int extra)
 EntityEvent.INIT.
 
void EOnExtra (IEntity other, int extra)
 EntityEvent.EXTRA.
 
void EOnNotVisible (IEntity other, int extra)
 EntityEvent.NOTVISIBLE.
 
void EOnFrame (IEntity other, float timeSlice)
 EntityEvent.FRAME.
 
int EOnVisible (IEntity other, int extra)
 EntityEvent.VISIBLE.
 
void EOnPostFrame (IEntity other, int extra)
 EntityEvent.POSTFRAME.
 
void EOnWorldProcess (IEntity other, int extra)
 EntityEvent.WORLDPROCESS.
 
void EOnAnimEvent (IEntity other, AnimEvent extra)
 EntityEvent.ANIMEVENT.
 
void EOnSoundEvent (IEntity other, SoundEvent extra)
 EntityEvent.SOUNDEVENT.
 
void EOnSimulate (IEntity other, float dt)
 EntityEvent.SIMULATE.
 
void EOnPostSimulate (IEntity other, float timeSlice)
 EntityEvent.POSTSIMULATE.
 
void EOnJointBreak (IEntity other, int extra)
 EntityEvent.JOINTBREAK.
 
void EOnPhysicsMove (IEntity other, int extra)
 EntityEvent.PHYSICSMOVE.
 
void EOnContact (IEntity other, Contact extra)
 EntityEvent.CONTACT.
 
void EOnUser0 (IEntity other, int extra)
 EntityEvent.EV_USER+0.
 
void EOnUser1 (IEntity other, int extra)
 EntityEvent.EV_USER+1.
 
void EOnEnter (IEntity other, int extra)
 EntityEvent.ENTER.
 
void EOnLeave (IEntity other, int extra)
 EntityEvent.LEAVE.
 
void EOnUser4 (IEntity other, int extra)
 EntityEvent.EV_USER+4.
 
void EOnDummy020 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy021 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy022 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy023 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy024 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy025 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy026 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy027 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy028 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy029 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy030 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy031 (IEntity other, int extra)
 Placeholder.
 

Transformation methods

Setting and getting of entity transformation

proto external void GetTransform (out vector mat[])
 Returns transformation of Entity. It returns only so much vectors as array is big.
 
proto external void GetRenderTransform (out vector mat[])
 Returns render transformation of Entity. Must pass in vector array size of 4.
 
proto external void GetLocalTransform (out vector mat[])
 Returns local transformation of Entity. It returns only so much vectors as array is big.
 
proto native external vector GetTransformAxis (int axis)
 Returns one row of Entity transformation matrix.
 
proto native external void SetTransform (vector mat[4])
 Sets entity transformation.
 
proto native external vector GetOrigin ()
 Returns origin of Entity.
 
proto external vector GetLocalPosition ()
 Returns local position of Entity.
 
proto native external vector GetYawPitchRoll ()
 Returns orientation of Entity in world space (Yaw, Pitch, Roll)
 
proto native external vector GetAngles ()
 Same as GetYawPitchRoll, but returns rotation vector around X, Y and Z axis.
 
proto native external vector GetLocalYawPitchRoll ()
 Returns local orientation when it's in hierarchy (Yaw, Pitch, Roll)
 
proto native external vector GetLocalAngles ()
 Same as GetLocalYawPitchRoll, but returns rotation vector around X, Y and Z axis.
 
proto native external void SetYawPitchRoll (vector angles)
 Sets angles for entity (Yaw, Pitch, Roll)
 
proto native external void SetAngles (vector angles)
 Same as SetYawPitchRoll, but sets rotation around X, Y and Z axis.
 
proto native external void SetOrigin (vector orig)
 Sets origin for entity.
 
proto native external float GetScale ()
 
proto native external void SetScale (float scale)
 
proto native external vector VectorToParent (vector vec)
 Transforms local vector to world space.
 
proto native external vector CoordToParent (vector coord)
 Transforms local position to world space.
 
proto native external vector VectorToLocal (vector vec)
 Transforms world space vector to local space.
 
proto native external vector CoordToLocal (vector coord)
 Transforms world space position to local space.
 

Name/ID methods <br>

proto native int GetID ()
 Return unique entity ID.
 
proto native void SetID (int id)
 Set unique entity ID.
 
proto native void SetName (string name)
 
proto native external owned string GetName ()
 

Hierarchy methods

Scene hierarchy management

proto native external bool AddChild (notnull IEntity child, int pivot, bool positionOnly=false)
 Adds child entity to this entity.
 
proto native external bool RemoveChild (notnull IEntity child, bool keepTransform=false)
 Removes child entity from hierarchy.
 
proto native bool IsHierarchyPositionOnly ()
 Returns if the hierarchy component was created with positionOnly.
 
proto native int GetHierarchyPivot ()
 Returns the hierarchy component pivot.
 
proto native IEntity GetParent ()
 Returns pointer to parent Entity in hierarchy.
 
proto native IEntity GetChildren ()
 Returns pointer to first child Entity in hierarchy.
 
proto native IEntity GetSibling ()
 Returns pointer to next child Entity on the same hierarchy.
 
proto external void GetBounds (out vector mins, out vector maxs)
 Returns local bounding box of model on Entity.
 
proto external void GetWorldBounds (out vector mins, out vector maxs)
 Returns quantized world-bound-box of Entity.
 

Simulation/handling properties

Flags that affects simulation and entity handling behavior

proto native external EntityFlags GetFlags ()
 Returns Entity flags.
 
proto native external bool IsFlagSet (EntityFlags flags)
 Test if one or more of specified flags are set.
 
proto native external EntityFlags SetFlags (EntityFlags flags, bool recursively)
 Sets Entity flags. It's OR operation, not rewrite. Returns previous flags.
 
proto native external EntityFlags ClearFlags (EntityFlags flags, bool recursively)
 Clear Entity flags. Returns cleared flags.
 
proto native external EntityEvent GetEventMask ()
 Returns current event mask.
 
proto native external EntityEvent SetEventMask (EntityEvent e)
 Sets event mask.
 
proto native external EntityEvent ClearEventMask (EntityEvent e)
 Clears 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.
 

Visual component methods

Manipulation with visual component - model, particle effect etc

proto native external void SetObject (vobject object, string options)
 
proto native vobject GetVObject ()
 Returns visual object set to this Entity. No reference is added.
 
proto native external int Animate (float speed, int loop)
 Updates animation (either xob, or particle, whatever)
 
proto native external int AnimateEx (float speed, int loop, out vector lin, out vector ang)
 Updates animation (either xob, or particle, whatever)
 
proto native external int SetCameraMask (int mask)
 Sets visibility mask for cameras, where Entity will be rendered.
 
proto native external void FilterNextTrace ()
 When called, the Entity is excluded from consequent TraceMove/TraceLine.
 
proto native external int Update ()
 

Подробное описание

Перечисления

◆ EntityEvent

Entity events for event-mask, or throwing event from code.

Элементы перечислений
TOUCH 

entity was touched by other entity

VISIBLE 

entity is visible, so part of the rendering other WorldClass extra frame index result false should be rendered, true shoudn't be rendered

Entity is visible. Is rendered if there is some attached object and event EntityEvent.VISIBLE is invoked, when event mask is set.

NOTVISIBLE 

entity is not visible, will not be part of rendering other WorldClass extra frame index

FRAME 

new frame event, called each frame other WorldClass extra frame index

POSTFRAME 

event at the end of each frame or when entity is moved during the frame other WorldClass

INIT 

event called after the world is created, including all entities other WorldClass

JOINTBREAK 
SIMULATE 
POSTSIMULATE 
PHYSICSMOVE 
CONTACT 
EXTRA 
ANIMEVENT 
SOUNDEVENT 
PHYSICSSTEADY 
USER 
ENTER 

Object entered Trigger.

LEAVE 

Object left Trigger.

ALL 

Mask of all events.

45{
47 TOUCH,
48
54
55 VISIBLE,
56
61
63
68
69 FRAME,
70
74
76
80
81 INIT,
82
83//Only with MeshObject
84//ANIMEND - End of AF_ONCE animation, extra = slot number 0...11
85//ANIMBLEND - Animation blended from previous one, extra = slot number 0...11
86
87
88//SOUNDEND - playing of SFL_ONCE sound has ended
89// extra = pointer to a sound handle
90
91//USER
92
97 CONTACT,
98 EXTRA,
102 USER,
103
105 ENTER,
107 LEAVE,
108
110 ALL
111};
@ PHYSICSMOVE
Definition EnEntity.c:96
@ INIT
Definition EnEntity.c:81
@ FRAME
Definition EnEntity.c:69
@ PHYSICSSTEADY
Definition EnEntity.c:101
@ POSTSIMULATE
Definition EnEntity.c:95
@ NOTVISIBLE
Definition EnEntity.c:62
@ TOUCH
entity was touched by other entity
Definition EnEntity.c:47
@ CONTACT
Definition EnEntity.c:97
@ SOUNDEVENT
Definition EnEntity.c:100
@ ENTER
Object entered Trigger.
Definition EnEntity.c:105
@ ANIMEVENT
Definition EnEntity.c:99
@ SIMULATE
Definition EnEntity.c:94
@ JOINTBREAK
Definition EnEntity.c:93
@ ALL
Mask of all events.
Definition EnEntity.c:110
@ POSTFRAME
Definition EnEntity.c:75
@ LEAVE
Object left Trigger.
Definition EnEntity.c:107
@ USER
Definition EnEntity.c:102
@ EXTRA
Definition EnEntity.c:98
@ VISIBLE
Definition EnEntity.c:55

◆ EntityFlags

Entity flags.

Элементы перечислений
VISIBLE 

entity is visible, so part of the rendering other WorldClass extra frame index result false should be rendered, true shoudn't be rendered

Entity is visible. Is rendered if there is some attached object and event EntityEvent.VISIBLE is invoked, when event mask is set.

SOLID 

Is collidable by various trace methods.

TRIGGER 

Is not collidable, but invokes touch events.

TOUCHTRIGGERS 

Interacts with triggers.

SYNCHRONIZATION_DIRTY 

Entity wants to synchronize (network)

FEATURE 

Scene rendering hint for dominant objects that are not culled by standard way.

TRANSLUCENT 

Used by tracing methods. When tracing with TraceFlags.PASSTRANSLUCENT, then this entity is ignored. Used for glass for example.

WATER 

Used by tracing methods. Traceable only with flag TraceFlags.WATER.

ACTIVE 

Tells that this entity has to be actively updated by engine, its EntityEvent.FRAME has to be called etc.

STATIC 

Static objects are included in the query.

Tells that this entity will represent mostly static object, so we can use more precise but slower methods for scene-tree linking. Also it tells to scene tree that he can count with this entity as tree-split hint.

USER1 

Flags for custom usage and filterings.

USER2 
USER3 
USER4 
USER5 
USER6 
115{
119
120 VISIBLE,
121
122
123 SOLID,
124 TRIGGER,
127
128 FEATURE,
132
134
136 WATER,
137
141
142 ACTIVE,
143
149
150 STATIC,
151
153 USER1,
154 USER2,
155 USER3,
156 USER4,
157 USER5,
158 USER6
159};
@ USER6
Definition EnEntity.c:158
@ TRIGGER
Is not collidable, but invokes touch events.
Definition EnEntity.c:124
@ SOLID
Is collidable by various trace methods.
Definition EnEntity.c:123
@ ACTIVE
Definition EnEntity.c:142
@ WATER
Used by tracing methods. Traceable only with flag TraceFlags.WATER.
Definition EnEntity.c:136
@ USER4
Definition EnEntity.c:156
@ USER5
Definition EnEntity.c:157
@ USER1
Flags for custom usage and filterings.
Definition EnEntity.c:153
@ TRANSLUCENT
Definition EnEntity.c:133
@ USER2
Definition EnEntity.c:154
@ TOUCHTRIGGERS
Interacts with triggers.
Definition EnEntity.c:125
@ FEATURE
Scene rendering hint for dominant objects that are not culled by standard way.
Definition EnEntity.c:128
@ USER3
Definition EnEntity.c:155
@ STATIC
Static objects are included in the query.
Definition EnEntity.c:150
@ SYNCHRONIZATION_DIRTY
Entity wants to synchronize (network)
Definition EnEntity.c:126

Функции

◆ AddChild()

proto native external bool AddChild ( notnull IEntity child,
int pivot,
bool positionOnly = false )
protected

Adds child entity to this entity.

Заметки
Make sure the parent is not ToDelete
Аргументы
childIEntity Pointer to entity which become our child
pivotint Pivot is pivot index, or -1 for center of parent.
positionOnlybool When set to true, the orientation will still be in WS.
Возвращает
bool True when entity has been attached. False otherwise.

◆ Animate()

proto native external int Animate ( float speed,
int loop )
protected

Updates animation (either xob, or particle, whatever)

◆ AnimateEx()

proto native external int AnimateEx ( float speed,
int loop,
out vector lin,
out vector ang )
protected

Updates animation (either xob, or particle, whatever)

◆ Attribute()

void Attribute ( string defvalue,
string uiwidget,
string desc = "",
string rangescale = "",
ParamEnumArray enums = NULL )
inlineprivate
832 {
836 m_Desc = desc;
837 m_Enums = enums;
838 }
Definition EntityAI.c:95
ref ParamEnumArray m_Enums
Only ints and floats are currently supported. Array can be defined this way: { ParamEnum("Choice 1",...
Definition EnEntity.c:829
string m_DefValue
Definition EnEntity.c:825
string m_UiWidget
can be "editbox", "combobox", "spinbox", "slider", "font", "fileeditbox", "colorPicker",...
Definition EnEntity.c:826
string m_Desc
Definition EnEntity.c:828
string m_RangeScale
defined as "MIN_VALUE MAX_VALUE STEP" eg. "1 100 0.5"
Definition EnEntity.c:827

Перекрестные ссылки Attribute::m_DefValue, Attribute::m_Desc, Attribute::m_Enums, Attribute::m_RangeScale и Attribute::m_UiWidget.

◆ ClearEventMask()

proto native external EntityEvent ClearEventMask ( EntityEvent e)
protected

Clears event mask.

Аргументы
eint event mask
Возвращает
int event mask
Man player = g_Game.GetPlayer();
player.SetEventMask(EntityEvent.VISIBLE );
Print( player.GetEventMask() );
player.ClearEventMask(EntityEvent.ALL );
Print( player.GetEventMask() );
>> 128
>> 0
DayZGame g_Game
Definition DayZGame.c:3815
proto void Print(void var)
Prints content of variable to console/log.
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:45

◆ ClearFlags()

proto native external EntityFlags ClearFlags ( EntityFlags flags,
bool recursively )
protected

Clear Entity flags. Returns cleared flags.

Аргументы
flagsint flags to be set
recursivelyflags will be recursively applied to children of hierarchy too
Возвращает
int cleared flags
Man player = g_Game.GetPlayer();
player.ClearFlags(EntityFlags.VISIBLE|EntityFlags.SOLID );
Print( player.GetFlags() );
>> 1610612744
EntityFlags
Entity flags.
Definition EnEntity.c:115

◆ CoordToLocal()

proto native external vector CoordToLocal ( vector coord)
protected

Transforms world space position to local space.

Аргументы
coordvector world space position to transform
Возвращает
vector position in local space
Man player = g_Game.GetPlayer();
Print( player.CoordToLocal("500 10 155") );
>> <15254,-54.2004,8745.53>

◆ CoordToParent()

proto native external vector CoordToParent ( vector coord)
protected

Transforms local position to world space.

Аргументы
coordvector local position to transform
Возвращает
vector position in world space
Man player = g_Game.GetPlayer();
Print( player.CoordToParent("1 2 3") );
>> <2549,17.6478,2857>

◆ EditorAttribute()

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 )
855 {
856 m_Style = style;
861 m_Color = color;
866 }
class Attribute m_Style
can be "box", "sphere", "cylinder", "pyramid", "diamond" or custom style name
string m_Category
folder structure eg. StaticEntities/Walls
Definition EnEntity.c:844
bool m_Insertable
Definition EnEntity.c:851
bool m_Visible
Definition EnEntity.c:850
string m_Color2
Definition EnEntity.c:849
string m_Description
class purpose description
Definition EnEntity.c:845
string m_Color
Definition EnEntity.c:848
bool m_DynamicBox
Definition EnEntity.c:852
vector m_SizeMax
max vector of a bounding box
Definition EnEntity.c:847
vector m_SizeMin
min vector of a bounding box
Definition EnEntity.c:846

Перекрестные ссылки m_Category, m_Color, m_Color2, m_Description, m_DynamicBox, m_Insertable, m_SizeMax, m_SizeMin, m_Style и m_Visible.

◆ EOnAnimEvent()

void EOnAnimEvent ( IEntity other,
AnimEvent extra )
inlineprotected

EntityEvent.ANIMEVENT.

196 {
197 }

◆ EOnContact()

void EOnContact ( IEntity other,
Contact extra )
inlineprotected

EntityEvent.CONTACT.

214 {
215 }

◆ EOnDummy020()

void EOnDummy020 ( IEntity other,
int extra )
inlineprotected

Placeholder.

232 {
233 }

◆ EOnDummy021()

void EOnDummy021 ( IEntity other,
int extra )
inlineprotected

Placeholder.

235 {
236 }

◆ EOnDummy022()

void EOnDummy022 ( IEntity other,
int extra )
inlineprotected

Placeholder.

238 {
239 }

◆ EOnDummy023()

void EOnDummy023 ( IEntity other,
int extra )
inlineprotected

Placeholder.

241 {
242 }

◆ EOnDummy024()

void EOnDummy024 ( IEntity other,
int extra )
inlineprotected

Placeholder.

244 {
245 }

◆ EOnDummy025()

void EOnDummy025 ( IEntity other,
int extra )
inlineprotected

Placeholder.

247 {
248 }

◆ EOnDummy026()

void EOnDummy026 ( IEntity other,
int extra )
inlineprotected

Placeholder.

250 {
251 }

◆ EOnDummy027()

void EOnDummy027 ( IEntity other,
int extra )
inlineprotected

Placeholder.

253 {
254 }

◆ EOnDummy028()

void EOnDummy028 ( IEntity other,
int extra )
inlineprotected

Placeholder.

256 {
257 }

◆ EOnDummy029()

void EOnDummy029 ( IEntity other,
int extra )
inlineprotected

Placeholder.

259 {
260 }

◆ EOnDummy030()

void EOnDummy030 ( IEntity other,
int extra )
inlineprotected

Placeholder.

262 {
263 }

◆ EOnDummy031()

void EOnDummy031 ( IEntity other,
int extra )
inlineprotected

Placeholder.

265 {
266 }

◆ EOnEnter()

void EOnEnter ( IEntity other,
int extra )
inlineprotected

EntityEvent.ENTER.

223 {
224 }

◆ EOnExtra()

void EOnExtra ( IEntity other,
int extra )
inlineprotected

EntityEvent.EXTRA.

178 {
179 }

◆ EOnFrame()

void EOnFrame ( IEntity other,
float timeSlice )
inlineprotected

EntityEvent.FRAME.

184 {
185 }

◆ EOnInit()

void EOnInit ( IEntity other,
int extra )
inlineprotected

EntityEvent.INIT.

175 {
176 }

◆ EOnJointBreak()

void EOnJointBreak ( IEntity other,
int extra )
inlineprotected

EntityEvent.JOINTBREAK.

208 {
209 }

◆ EOnLeave()

void EOnLeave ( IEntity other,
int extra )
inlineprotected

EntityEvent.LEAVE.

226 {
227 }

◆ EOnNotVisible()

void EOnNotVisible ( IEntity other,
int extra )
inlineprotected

EntityEvent.NOTVISIBLE.

181 {
182 }

◆ EOnPhysicsMove()

void EOnPhysicsMove ( IEntity other,
int extra )
inlineprotected

EntityEvent.PHYSICSMOVE.

211 {
212 }

◆ EOnPostFrame()

void EOnPostFrame ( IEntity other,
int extra )
inlineprotected

EntityEvent.POSTFRAME.

190 {
191 }

◆ EOnPostSimulate()

void EOnPostSimulate ( IEntity other,
float timeSlice )
inlineprotected

EntityEvent.POSTSIMULATE.

205 {
206 }

◆ EOnSimulate()

void EOnSimulate ( IEntity other,
float dt )
inlineprotected

EntityEvent.SIMULATE.

202 {
203 }

◆ EOnSoundEvent()

void EOnSoundEvent ( IEntity other,
SoundEvent extra )
inlineprotected

EntityEvent.SOUNDEVENT.

199 {
200 }

◆ EOnTouch()

void EOnTouch ( IEntity other,
int extra )
inlineprotected

EntityEvent.TOUCH.

172 {
173 }

◆ EOnUser0()

void EOnUser0 ( IEntity other,
int extra )
inlineprotected

EntityEvent.EV_USER+0.

217 {
218 }

◆ EOnUser1()

void EOnUser1 ( IEntity other,
int extra )
inlineprotected

EntityEvent.EV_USER+1.

220 {
221 }

◆ EOnUser4()

void EOnUser4 ( IEntity other,
int extra )
inlineprotected

EntityEvent.EV_USER+4.

229 {
230 }

◆ EOnVisible()

int EOnVisible ( IEntity other,
int extra )
inlineprotected

EntityEvent.VISIBLE.

187 {
188 }

◆ EOnWorldProcess()

void EOnWorldProcess ( IEntity other,
int extra )
inlineprotected

EntityEvent.WORLDPROCESS.

193 {
194 }

◆ FilterNextTrace()

proto native external void FilterNextTrace ( )
protected

When called, the Entity is excluded from consequent TraceMove/TraceLine.

◆ FromEnum()

ParamEnum Managed FromEnum ( typename e )
805 {
807 int cnt = e.GetVariableCount();
808 int val;
809
810 for (int i = 0; i < cnt; i++)
811 {
812 if (e.GetVariableType(i) == int && e.GetVariableValue(NULL, i, val))
813 {
814 params.Insert(new ParamEnum(e.GetVariableName(i), val.ToString()));
815 }
816 }
817
818 return params;
819 }
void ParamEnum(string key, string value, string desc="")
Definition EnEntity.c:809

◆ Get()

proto bool Get ( int varIndex,
out void val )
private

◆ GetAngles()

proto native external vector GetAngles ( )
protected

Same as GetYawPitchRoll, but returns rotation vector around X, Y and Z axis.

◆ GetBounds()

proto external void GetBounds ( out vector mins,
out vector maxs )
protected

Returns local bounding box of model on Entity.

Аргументы
[out]minsvector minimum point of bounding box
[out]maxsvector maximum point of bounding box
Man player = g_Game.GetPlayer();
player.GetBounds(mins, maxs );
>> <0,0,0>
>> <0,0,0>
Definition EnConvert.c:106

◆ GetChildren() [1/3]

proto native IEntitySource GetChildren ( )
private

◆ GetChildren() [2/3]

proto native WidgetSource GetChildren ( )
private

◆ GetChildren() [3/3]

proto native IEntity GetChildren ( )
protected

Returns pointer to first child Entity in hierarchy.

Используется в GetAttachedChildren().

◆ GetClassName()

proto native owned string GetClassName ( )
private

◆ GetEventMask()

proto native external EntityEvent GetEventMask ( )
protected

Returns current event mask.

Возвращает
int current event mask
Man player = g_Game.GetPlayer();
Print( player.GetEventMask() );
>> 0

◆ GetFlags()

proto native external EntityFlags GetFlags ( )
protected

Returns Entity flags.

Возвращает
EntityFlags entity flags
Man player = g_Game.GetPlayer();
Print( player.GetFlags() );
>> 1610612745

◆ GetHierarchyPivot()

proto native int GetHierarchyPivot ( )
protected

Returns the hierarchy component pivot.

◆ GetID()

proto native int GetID ( )
protected

Return unique entity ID.

Возвращает
int unique entity ID
ItemBase apple = g_Game.CreateObject( "FruitApple", String2Vector("0 10 0"), false );
Print( apple.GetID() );
>> 0
Definition InventoryItem.c:731

◆ GetLocalAngles()

proto native external vector GetLocalAngles ( )
protected

Same as GetLocalYawPitchRoll, but returns rotation vector around X, Y and Z axis.

◆ GetLocalPosition()

proto external vector GetLocalPosition ( )
protected

Returns local position of Entity.

Возвращает
vector entity local position
Man player = g_Game.GetPlayer();
Print( player.GetOrigin() );
>> <2577.02,15.6837,2924.27>

◆ GetLocalTransform()

proto external void GetLocalTransform ( out vector mat[])
protected

Returns local transformation of Entity. It returns only so much vectors as array is big.

Аргументы
matvector[1...4] matrix to be get
Man player = g_Game.GetPlayer();
player.GetTransform(mat);
>> <0.989879,-0,0.141916>,<0,1,0>,<-0.141916,0,0.989879>,<2545.08,15.6754,2867.49>

◆ GetLocalYawPitchRoll()

proto native external vector GetLocalYawPitchRoll ( )
protected

Returns local orientation when it's in hierarchy (Yaw, Pitch, Roll)

Возвращает
vector local orientation
Man player = g_Game.GetPlayer();
Print( player.GetLocalYawPitchRoll() );
>> <180,-57.2585,180>

◆ GetName() [1/2]

proto native owned string GetName ( )
private

◆ GetName() [2/2]

proto native external owned string GetName ( )
protected

◆ GetOrigin()

proto native external vector GetOrigin ( )
protected

Returns origin of Entity.

Возвращает
vector entity origin
Man player = g_Game.GetPlayer();
Print( player.GetOrigin() );
>> <2577.02,15.6837,2924.27>

◆ GetParent() [1/3]

proto native IEntitySource GetParent ( )
private

◆ GetParent() [2/3]

proto native WidgetSource GetParent ( )
private

◆ GetParent() [3/3]

proto native IEntity GetParent ( )
protected

Returns pointer to parent Entity in hierarchy.

◆ GetRenderTransform()

proto external void GetRenderTransform ( out vector mat[])
protected

Returns render transformation of Entity. Must pass in vector array size of 4.

Аргументы
matvector[4] matrix to be get
Man player = g_Game.GetPlayer();
player.GetRenderTransform(mat);
>> <0.989879,-0,0.141916>,<0,1,0>,<-0.141916,0,0.989879>,<2545.08,15.6754,2867.49>

◆ GetScale()

proto native external float GetScale ( )
protected

◆ GetSibling() [1/3]

proto native IEntitySource GetSibling ( )
private

◆ GetSibling() [2/3]

proto native WidgetSource GetSibling ( )
private

◆ GetSibling() [3/3]

proto native IEntity GetSibling ( )
protected

Returns pointer to next child Entity on the same hierarchy.

◆ GetTransform()

proto external void GetTransform ( out vector mat[])
protected

Returns transformation of Entity. It returns only so much vectors as array is big.

Аргументы
matvector[1...4] matrix to be get
Man player = g_Game.GetPlayer();
player.GetTransform(mat);
>> <0.989879,-0,0.141916>,<0,1,0>,<-0.141916,0,0.989879>,<2545.08,15.6754,2867.49>

◆ GetTransformAxis()

proto native external vector GetTransformAxis ( int axis)
protected

Returns one row of Entity transformation matrix.

Аргументы
axisint matrix axis. Can be 0..3
Возвращает
vector axis row of Entity matrix
Man player = g_Game.GetPlayer();
Print( player.GetTransformAxis(0) );
Print( player.GetTransformAxis(1) );
Print( player.GetTransformAxis(2) );
Print( player.GetTransformAxis(3) );
>> <-0.386781,0,0.922171>
>> <0,1,0>
>> <-0.922171,0,-0.386782>
>> <2551.34,15.6439,2856.72>

◆ GetVObject()

proto native vobject GetVObject ( )
protected

Returns visual object set to this Entity. No reference is added.

◆ GetWorldBounds()

proto external void GetWorldBounds ( out vector mins,
out vector maxs )
protected

Returns quantized world-bound-box of Entity.

Аргументы
[out]minsvector minimum point of bounding box
[out]maxsvector maximum point of bounding box
Man player = g_Game.GetPlayer();
player.GetWorldBounds( mins, maxs );
>> <2547.2,15.5478,2852.85>
>> <2548.8,17.5478,2855.05>

◆ GetYawPitchRoll()

proto native external vector GetYawPitchRoll ( )
protected

Returns orientation of Entity in world space (Yaw, Pitch, Roll)

Возвращает
vector entity orientation
Man player = g_Game.GetPlayer();
Print( player.GetYawPitchRoll() );
>> <180,-76.5987,180>

◆ IsFlagSet()

proto native external bool IsFlagSet ( EntityFlags flags)
protected

Test if one or more of specified flags are set.

Возвращает
bool True if is set, false otherwise.
Man player = g_Game.GetPlayer();
player.SetFlags(EntityFlags.VISIBLE);
Print( player.IsFlagSet(EntityFlags.VISIBLE) );
>> true

◆ IsHierarchyPositionOnly()

proto native bool IsHierarchyPositionOnly ( )
protected

Returns if the hierarchy component was created with positionOnly.

◆ IsType()

proto bool IsType ( int varIndex,
typename type  )
private

◆ IsVariableSet()

proto native bool IsVariableSet ( int varIndex)
private

◆ ParamEnum() [1/2]

void ParamEnum ( string key,
string value,
string desc = "" )
inlineprivate
795 {
796 m_Key = key;
797 m_Value = value;
798 m_Desc = desc;
799 }
string m_Key
Definition EnEntity.c:790
string m_Value
Definition EnEntity.c:791

Перекрестные ссылки ParamEnum::m_Desc, ParamEnum::m_Key и ParamEnum::m_Value.

◆ ParamEnum() [2/2]

void ParamEnum ( string key,
string value,
string desc = "" )
811 {
812 if (e.GetVariableType(i) == int && e.GetVariableValue(NULL, i, val))
813 {
814 params.Insert(new ParamEnum(e.GetVariableName(i), val.ToString()));

Перекрестные ссылки ParamEnum().

Используется в ParamEnum().

◆ RemoveChild()

proto native external bool RemoveChild ( notnull IEntity child,
bool keepTransform = false )
protected

Removes child entity from hierarchy.

Заметки
Make sure the child is not ToDelete
Аргументы
childIEntity Pointer to child entity we want to remove.
keepTransformbool When set to true, Entity is kept on her world position. Otherwise it's local transform is used as world-space one.
Возвращает
bool True if it was removed, false when this entity is not our child.

◆ SendEvent()

proto external volatile void SendEvent ( notnull IEntity actor,
EntityEvent e,
void extra )
protected

Dynamic event invokation. Parameters are the same as in IEntity::EOnXXXX() methods.

◆ SetAngles()

proto native external void SetAngles ( vector angles)
protected

Same as SetYawPitchRoll, but sets rotation around X, Y and Z axis.

◆ SetCameraMask()

proto native external int SetCameraMask ( int mask)
protected

Sets visibility mask for cameras, where Entity will be rendered.

◆ SetEventMask()

proto native external EntityEvent SetEventMask ( EntityEvent e)
protected

Sets event mask.

Аргументы
ecombined mask of one or more members of EntityEvent enum
Man player = g_Game.GetPlayer();
Print( player.GetEventMask() );
player.SetEventMask( EntityEvent.VISIBLE );
Print( player.GetEventMask() );
>> 0
>> 128

◆ SetFlags()

proto native external EntityFlags SetFlags ( EntityFlags flags,
bool recursively )
protected

Sets Entity flags. It's OR operation, not rewrite. Returns previous flags.

Аргументы
flagsint flags to be set
recursivelyflags will be recursively applied to children of hierarchy too
Возвращает
int previous flags
Man player = g_Game.GetPlayer();
player.SetFlags(EntityFlags.VISIBLE|EntityFlags.SOLID );
Print( player.GetFlags() );
>> 1610612747

◆ SetID()

proto native void SetID ( int id)
protected

Set unique entity ID.

Аргументы
idint unique entity ID to be set
ItemBase apple = g_Game.CreateObject( "Fruit_Apple", String2Vector("0 10 0"), false );
apple.SetID(101);
Print( apple.GetID() );
>> 101

◆ SetName()

proto native void SetName ( string name)
protected

◆ SetObject()

proto native external void SetObject ( vobject object,
string options )
protected
\brief Sets the visual object to this entity. Reference is added and released upon entity destruction
\param object handle to object got by GetObject()
\param options String, dependant on object type.

Only supported one for XOB objects: $remap 'original material name' 'new material'; [$remap 'another original material name' 'anothernew material']

◆ SetOrigin()

proto native external void SetOrigin ( vector orig)
protected

Sets origin for entity.

Аргументы
origvector origin to be set
Man player = g_Game.GetPlayer();
player.SetOrigin("2550 10 2900" );
Print( player.GetOrigin() );
>> <2550,10,2900>

◆ SetScale()

proto native external void SetScale ( float scale)
protected

◆ SetTransform()

proto native external void SetTransform ( vector mat[4])
protected

Sets entity transformation.

Аргументы
matvector[4] matrix to be set
Math3D.MatrixIdentity( mat )
Man player = g_Game.GetPlayer();
player.SetTransform( mat );
player.GetTransform(outmat );
>> <1,0,0>,<0,1,0>,<0,0,1>,<0,0,0>
Definition EnMath3D.c:28

◆ SetYawPitchRoll()

proto native external void SetYawPitchRoll ( vector angles)
protected

Sets angles for entity (Yaw, Pitch, Roll)

Аргументы
anglesvector angles to be set
Man player = g_Game.GetPlayer();
player.SetYawPitchRoll("180 50 180" );
Print( player.GetYawPitchRoll() );
>> <-180,50,-180>

◆ Update()

proto native external int Update ( )
protected
Updates entity state/position. Should be called when you want to manually commit position changes etc
before trace methods etc. Entity is updated automatically at the end and the beginning of simulation step,
when it has EntityFlags.TFL_ACTIVE flag set.
\returns mask with flags

EntityFlags.UPDATE - hierarchy has been updated EntityFlags.UPDATE_MDL - model hierarchy has been updated

◆ VarIndex()

proto native int VarIndex ( string varName)
private

◆ VectorToLocal()

proto native external vector VectorToLocal ( vector vec)
protected

Transforms world space vector to local space.

Аргументы
vecvector world space vector to transform
Возвращает
vector local space vector
Man player = g_Game.GetPlayer();
Print( player.VectorToLocal("2 1 5") );
>> <-0.166849,1,5.38258>

◆ VectorToParent()

proto native external vector VectorToParent ( vector vec)
protected

Transforms local vector to world space.

Аргументы
vecvector local space vector to transform
Возвращает
vector world space vector
Man player = g_Game.GetPlayer();
Print( player.VectorToParent("1 2 3") );
>> <2.89791,2,1.26575>

Переменные

◆ m_Category

string m_Category

folder structure eg. StaticEntities/Walls

Используется в EditorAttribute(), GestureMenuItem(), GetCategory(), GetItemCategory() и RadialQuickbarItem().

◆ m_Color

string m_Color

Используется в EditorAttribute().

◆ m_Color2

string m_Color2

Используется в EditorAttribute().

◆ m_DefValue

string m_DefValue
private

Используется в Attribute::Attribute().

◆ m_Desc [1/3]

string m_Desc
private

Используется в ParamEnum::ParamEnum().

◆ m_Desc [2/3]

string m_Desc

◆ m_Desc [3/3]

string m_Desc
private

Используется в Attribute::Attribute().

◆ m_Description

◆ m_DynamicBox

bool m_DynamicBox

Используется в EditorAttribute().

◆ m_Enums

ref ParamEnumArray m_Enums
private

Only ints and floats are currently supported. Array can be defined this way: { ParamEnum("Choice 1", "1"), ParamEnum("Choicen 2", "2") }.

Используется в Attribute::Attribute().

◆ m_Insertable

bool m_Insertable

Используется в EditorAttribute().

◆ m_Key [1/2]

string m_Key
private

Используется в ParamEnum::ParamEnum().

◆ m_Key [2/2]

◆ m_RangeScale

string m_RangeScale
private

defined as "MIN_VALUE MAX_VALUE STEP" eg. "1 100 0.5"

Используется в Attribute::Attribute().

◆ m_SizeMax

vector m_SizeMax

max vector of a bounding box

Используется в EditorAttribute().

◆ m_SizeMin

vector m_SizeMin

min vector of a bounding box

Используется в EditorAttribute().

◆ m_Style

class Attribute m_Style

can be "box", "sphere", "cylinder", "pyramid", "diamond" or custom style name

Используется в EditorAttribute().

◆ m_UiWidget

string m_UiWidget
private

can be "editbox", "combobox", "spinbox", "slider", "font", "fileeditbox", "colorPicker", "flags", "resourceNamePicker"

Используется в Attribute::Attribute().

◆ m_Value [1/2]

string m_Value
private

Используется в ParamEnum::ParamEnum().

◆ m_Value [2/2]

◆ m_Visible