DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
EnEntity.c
См. документацию.
1typedef int[] BaseContainer;
2typedef int[] IEntitySource;
3typedef int[] WidgetSource;
4
6{
7 proto native owned string GetClassName();
8 proto native owned string GetName();
9 proto native int VarIndex(string varName);
10 proto native bool IsVariableSet(int varIndex);
11 proto bool IsType(int varIndex, typename type);
12 proto bool Get(int varIndex, out void val);
13};
14
16{
17 proto native IEntitySource GetChildren();
18 proto native IEntitySource GetSibling();
19 proto native IEntitySource GetParent();
20};
21
23{
24 proto native WidgetSource GetChildren();
25 proto native WidgetSource GetSibling();
26 proto native WidgetSource GetParent();
27};
28
33
38
39
40
42
45{
48
56
63
70
76
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
103
108
111};
112
160
165{
166//DO NOT INSERT ANYTHING BELOW - order of event methods matters!
171 event protected void EOnTouch(IEntity other, int extra)
172 {
173 }
174 event protected void EOnInit(IEntity other, int extra)
175 {
176 }
177 event protected void EOnExtra(IEntity other, int extra)
178 {
179 }
180 event protected void EOnNotVisible(IEntity other, int extra)
181 {
182 }
183 event protected void EOnFrame(IEntity other, float timeSlice)
184 {
185 }
186 event protected int EOnVisible(IEntity other, int extra)
187 {
188 }
189 event protected void EOnPostFrame(IEntity other, int extra)
190 {
191 }
192 event protected void EOnWorldProcess(IEntity other, int extra)
193 {
194 }
195 event protected void EOnAnimEvent(IEntity other, AnimEvent extra)
196 {
197 }
198 event protected void EOnSoundEvent(IEntity other, SoundEvent extra)
199 {
200 }
201 event protected void EOnSimulate(IEntity other, float dt)
202 {
203 }
204 event protected void EOnPostSimulate(IEntity other, float timeSlice)
205 {
206 }
207 event protected void EOnJointBreak(IEntity other, int extra)
208 {
209 }
210 event protected void EOnPhysicsMove(IEntity other, int extra)
211 {
212 }
213 event protected void EOnContact(IEntity other, Contact extra)
214 {
215 }
216 protected void EOnUser0(IEntity other, int extra)
217 {
218 }
219 protected void EOnUser1(IEntity other, int extra)
220 {
221 }
222 event protected void EOnEnter(IEntity other, int extra)
223 {
224 }
225 event protected void EOnLeave(IEntity other, int extra)
226 {
227 }
228 protected void EOnUser4(IEntity other, int extra)
229 {
230 }
231 protected void EOnDummy020(IEntity other, int extra)
232 {
233 }
234 protected void EOnDummy021(IEntity other, int extra)
235 {
236 }
237 protected void EOnDummy022(IEntity other, int extra)
238 {
239 }
240 protected void EOnDummy023(IEntity other, int extra)
241 {
242 }
243 protected void EOnDummy024(IEntity other, int extra)
244 {
245 }
246 protected void EOnDummy025(IEntity other, int extra)
247 {
248 }
249 protected void EOnDummy026(IEntity other, int extra)
250 {
251 }
252 protected void EOnDummy027(IEntity other, int extra)
253 {
254 }
255 protected void EOnDummy028(IEntity other, int extra)
256 {
257 }
258 protected void EOnDummy029(IEntity other, int extra)
259 {
260 }
261 protected void EOnDummy030(IEntity other, int extra)
262 {
263 }
264 protected void EOnDummy031(IEntity other, int extra)
265 {
266 }
267
268//DO NOT INSERT ANYTHING ABOVE - order of event methods matters!
269
274
288 proto external void GetTransform(out vector mat[]);
289
303 proto external void GetRenderTransform(out vector mat[]);
304
318 proto external void GetLocalTransform(out vector mat[]);
319
337 proto native external vector GetTransformAxis(int axis);
338
356 proto native external void SetTransform(vector mat[4]);
357
368 proto native external vector GetOrigin();
369
380 proto external vector GetLocalPosition();
381
392 proto native external vector GetYawPitchRoll();
393
397 proto native external vector GetAngles();
398
409 proto native external vector GetLocalYawPitchRoll();
410
414 proto native external vector GetLocalAngles();
415
427 proto native external void SetYawPitchRoll(vector angles);
428
432 proto native external void SetAngles(vector angles);
433
445 proto native external void SetOrigin(vector orig);
446
447 proto native external float GetScale();
448 proto native external void SetScale(float scale);
460 proto native external vector VectorToParent(vector vec);
461
473 proto native external vector CoordToParent(vector coord);
474
486 proto native external vector VectorToLocal(vector vec);
487
499 proto native external vector CoordToLocal(vector coord);
500
502
503
507
518 proto native int GetID();
519
531 proto native void SetID(int id);
532
533 proto native void SetName(string name);
534 proto native external owned string GetName();
536
537
542
551 proto native external bool AddChild(notnull IEntity child, int pivot, bool positionOnly = false);
552
560 proto native external bool RemoveChild(notnull IEntity child, bool keepTransform = false);
561
563 proto native bool IsHierarchyPositionOnly();
564
566 proto native int GetHierarchyPivot();
567
569 proto native IEntity GetParent();
571 proto native IEntity GetChildren();
573 proto native IEntity GetSibling();
575
593 proto external void GetBounds(out vector mins, out vector maxs);
594
612 proto external void GetWorldBounds(out vector mins, out vector maxs);
613
618
628 proto native external EntityFlags GetFlags();
629
641 proto native external bool IsFlagSet(EntityFlags flags);
642
656 proto native external EntityFlags SetFlags(EntityFlags flags, bool recursively);
657
671 proto native external EntityFlags ClearFlags(EntityFlags flags, bool recursively);
672
673
684 proto native external EntityEvent GetEventMask();
685
699 proto native external EntityEvent SetEventMask(EntityEvent e );
700
716 proto native external EntityEvent ClearEventMask(EntityEvent e);
717
719 proto external volatile void SendEvent(notnull IEntity actor, EntityEvent e, void extra);
720
722
727
735 proto native external void SetObject(vobject object, string options);
736
740 proto native vobject GetVObject();
741
743 proto native external int Animate(float speed, int loop);
745 proto native external int AnimateEx(float speed, int loop, out vector lin, out vector ang);
746
748 proto native external int SetCameraMask(int mask);
750
754 proto native external void FilterNextTrace();
755
764 proto native external int Update();
765
766#ifdef COMPONENT_SYSTEM
768 protected void IEntity(IEntitySource src, IEntity parent);
769#endif
770};
771
772#ifdef ENF_DONE
773// Set fixed LOD. -1 for non-fixed LOD
774proto native void SetFixedLOD(IEntity ent, int lod);
775//Sets the texture that can be referenced from material as $renderview
776//and connects it with camera cam_index. Size iz recommended size of
777//rendertarget (0 is default)
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);
780#endif
781
782
787
789{
790 string m_Key;
791 string m_Value;
792 string m_Desc;
793
794 void ParamEnum(string key, string value, string desc = "")
795 {
796 m_Key = key;
797 m_Value = value;
798 m_Desc = desc;
799 }
800}
801
802class ParamEnumArray: array<ref ParamEnum>
803{
804 static ParamEnumArray FromEnum(typename e)
806 ParamEnumArray params = new ParamEnumArray();
807 int cnt = e.GetVariableCount();
808 int val;
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 }
820}
821
822// -------------------------------------------------------------------------
824{
826 string m_UiWidget;
828 string m_Desc;
829 ref ParamEnumArray m_Enums;
830
831 void Attribute(string defvalue, string uiwidget, string desc = "", string rangescale = "", ParamEnumArray enums = NULL)
832 {
833 m_DefValue = defvalue;
834 m_UiWidget = uiwidget;
835 m_RangeScale = rangescale;
836 m_Desc = desc;
837 m_Enums = enums;
838 }
839}
840
841class EditorAttribute
842{
843 string m_Style;
844 string m_Category;
848 string m_Color;
849 string m_Color2;
853
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)
855 {
856 m_Style = style;
857 m_Category = category;
858 m_Description = description;
859 m_SizeMin = sizeMin;
860 m_SizeMax = sizeMax;
861 m_Color = color;
862 m_Color2 = color2;
863 m_Visible = visible;
864 m_Insertable = insertable;
865 m_DynamicBox = dynamicBox;
866 }
867}
869
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Определения proto.c:34
Определения EnEntity.c:6
Определения EnPhysics.c:305
Определения EnEntity.c:165
Определения EnEntity.c:16
TODO doc.
Определения EnScript.c:118
Определения proto.c:40
Определения EnEntity.c:23
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:106
Определения proto.c:49
@ VISIBLE
Определения EnDebug.c:136
proto native IEntitySource GetSibling()
proto native WidgetSource GetSibling()
void EOnWorldProcess(IEntity other, int extra)
EntityEvent.WORLDPROCESS.
Определения EnEntity.c:192
proto bool Get(int varIndex, out void val)
proto native WidgetSource GetChildren()
void EOnDummy022(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:237
void EOnExtra(IEntity other, int extra)
EntityEvent.EXTRA.
Определения EnEntity.c:177
void ParamEnum(string key, string value, string desc="")
Определения EnEntity.c:809
proto native vobject GetVObject()
Returns visual object set to this Entity. No reference is added.
void EOnDummy031(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:264
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",...
Определения EnEntity.c:826
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"
Определения EnEntity.c:827
proto native void SetID(int id)
Set unique entity ID.
void EOnDummy026(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:249
void EOnUser4(IEntity other, int extra)
EntityEvent.EV_USER+4.
Определения EnEntity.c:228
void Attribute(string defvalue, string uiwidget, string desc="", string rangescale="", ParamEnumArray enums=NULL)
Определения EnEntity.c:831
void EOnSimulate(IEntity other, float dt)
EntityEvent.SIMULATE.
Определения EnEntity.c:201
proto native owned string GetClassName()
void EOnDummy023(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:240
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="")
Определения EnEntity.c:794
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",...
Определения EnEntity.c:829
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
Определения EnEntity.c:844
proto native external vector GetTransformAxis(int axis)
Returns one row of Entity transformation matrix.
int EOnVisible(IEntity other, int extra)
EntityEvent.VISIBLE.
Определения EnEntity.c:186
bool m_Insertable
Определения EnEntity.c:851
void EOnUser1(IEntity other, int extra)
EntityEvent.EV_USER+1.
Определения EnEntity.c:219
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.
Определения EnEntity.c:216
void EOnContact(IEntity other, Contact extra)
EntityEvent.CONTACT.
Определения EnEntity.c:213
void EOnFrame(IEntity other, float timeSlice)
EntityEvent.FRAME.
Определения EnEntity.c:183
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.
bool m_Visible
Определения EnEntity.c:850
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.
Определения EnEntity.c:243
proto native int GetID()
Return unique entity ID.
void EOnSoundEvent(IEntity other, SoundEvent extra)
EntityEvent.SOUNDEVENT.
Определения EnEntity.c:198
void EOnTouch(IEntity other, int extra)
EntityEvent.TOUCH.
Определения EnEntity.c:171
string m_Color2
Определения EnEntity.c:849
proto native external vector GetOrigin()
Returns origin of Entity.
void EOnDummy025(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:246
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.
Определения EnEntity.c:195
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
Определения EnEntity.c:845
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)
Определения EnEntity.c:804
string m_Desc
Определения EnEntity.c:792
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.
Определения EnEntity.c:45
@ PHYSICSMOVE
Определения EnEntity.c:96
@ INIT
Определения EnEntity.c:81
@ FRAME
Определения EnEntity.c:69
@ PHYSICSSTEADY
Определения EnEntity.c:101
@ POSTSIMULATE
Определения EnEntity.c:95
@ NOTVISIBLE
Определения EnEntity.c:62
@ TOUCH
entity was touched by other entity
Определения EnEntity.c:47
@ CONTACT
Определения EnEntity.c:97
@ SOUNDEVENT
Определения EnEntity.c:100
@ ENTER
Object entered Trigger.
Определения EnEntity.c:105
@ ANIMEVENT
Определения EnEntity.c:99
@ SIMULATE
Определения EnEntity.c:94
@ JOINTBREAK
Определения EnEntity.c:93
@ ALL
Mask of all events.
Определения EnEntity.c:110
@ POSTFRAME
Определения EnEntity.c:75
@ LEAVE
Object left Trigger.
Определения EnEntity.c:107
@ USER
Определения EnEntity.c:102
@ EXTRA
Определения EnEntity.c:98
string m_Key
Определения EnEntity.c:790
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.
Определения EnEntity.c:261
proto native void SetName(string name)
void EOnDummy028(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:255
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.
Определения EnEntity.c:204
void EOnPostFrame(IEntity other, int extra)
EntityEvent.POSTFRAME.
Определения EnEntity.c:189
proto native owned string GetName()
proto native IEntitySource GetParent()
proto native external void FilterNextTrace()
When called, the Entity is excluded from consequent TraceMove/TraceLine.
string m_Color
Определения EnEntity.c:848
proto native external void SetScale(float scale)
void EOnEnter(IEntity other, int extra)
EntityEvent.ENTER.
Определения EnEntity.c:222
bool m_DynamicBox
Определения EnEntity.c:852
EntityFlags
Entity flags.
Определения EnEntity.c:115
@ USER6
Определения EnEntity.c:158
@ TRIGGER
Is not collidable, but invokes touch events.
Определения EnEntity.c:124
@ SOLID
Is collidable by various trace methods.
Определения EnEntity.c:123
@ ACTIVE
Определения EnEntity.c:142
@ WATER
Used by tracing methods. Traceable only with flag TraceFlags.WATER.
Определения EnEntity.c:136
@ USER4
Определения EnEntity.c:156
@ USER5
Определения EnEntity.c:157
@ USER1
Flags for custom usage and filterings.
Определения EnEntity.c:153
@ TRANSLUCENT
Определения EnEntity.c:133
@ USER2
Определения EnEntity.c:154
@ TOUCHTRIGGERS
Interacts with triggers.
Определения EnEntity.c:125
@ FEATURE
Scene rendering hint for dominant objects that are not culled by standard way.
Определения EnEntity.c:128
@ USER3
Определения EnEntity.c:155
@ STATIC
Static objects are included in the query.
Определения EnEntity.c:150
@ SYNCHRONIZATION_DIRTY
Entity wants to synchronize (network)
Определения EnEntity.c:126
void EOnLeave(IEntity other, int extra)
EntityEvent.LEAVE.
Определения EnEntity.c:225
proto native external bool RemoveChild(notnull IEntity child, bool keepTransform=false)
Removes child entity from hierarchy.
string m_Value
Определения EnEntity.c:791
proto native bool IsVariableSet(int varIndex)
string m_Desc
Определения EnEntity.c:828
void EOnInit(IEntity other, int extra)
EntityEvent.INIT.
Определения EnEntity.c:174
proto native external EntityFlags GetFlags()
Returns Entity flags.
void EOnJointBreak(IEntity other, int extra)
EntityEvent.JOINTBREAK.
Определения EnEntity.c:207
void EOnDummy020(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:231
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.
string m_DefValue
Определения EnEntity.c:825
void EOnDummy027(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:252
void EOnDummy029(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:258
void EOnPhysicsMove(IEntity other, int extra)
EntityEvent.PHYSICSMOVE.
Определения EnEntity.c:210
proto native external EntityEvent GetEventMask()
Returns current event mask.
vector m_SizeMax
max vector of a bounding box
Определения EnEntity.c:847
void EOnNotVisible(IEntity other, int extra)
EntityEvent.NOTVISIBLE.
Определения EnEntity.c:180
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)
Определения EnEntity.c:854
proto native external vector VectorToParent(vector vec)
Transforms local vector to world space.
void EOnDummy021(IEntity other, int extra)
Placeholder.
Определения EnEntity.c:234
vector m_SizeMin
min vector of a bounding box
Определения EnEntity.c:846
proto native int VarIndex(string varName)