3 static const int COLOR_OBJ_BBOX_NORMAL = 0x00000000;
4 static const int COLOR_OBJ_BBOX_SELECT = 0x1f007C00;
28 PluginDeveloper module_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
29 EntityAI e = module_dev.SpawnEntityOnGroundPos(PluginSceneManager.PLAYER, obj_name, 100, 0.0, pos);
36 if (item.HasQuantity())
37 item.SetQuantity(item.GetQuantityMax());
43 else if (obj_name !=
"player")
152 size[0] = min_max[1][0] - min_max[0][0];
153 size[2] = min_max[1][2] - min_max[0][2];
154 size[1] = min_max[1][1] - min_max[0][1];
179 float width = size[0];
180 float height = size[1];
181 float length = size[2];
183 float width_h = width*0.5;
184 float lenght_h = length*0.5;
242 pos1[0] = 0; pos1[1] = pos1[1] / 2; pos1[2] = 0;
243 pos1 = pos1 + obj.
GetObject().GetPosition();
246 pos2[0] = 0; pos2[1] = pos2[1] / 2; pos2[2] = 0;
314 for (
int i = 0; i < link_count; ++i)
476 return Vector(0,0,0).ToString(
false);
535 v[0] = v[0] + add_rot;
548 GetObject().GetInventory().CreateAttachment(att_name);
556 return GetObject().GetInventory().CanAddAttachment(e);
574 for (
int i = 0; i <
GetObject().GetInventory().AttachmentCount(); ++i)
576 ret.Insert(
GetObject().GetInventory().GetAttachmentFromIndex(i));
605 GetGame().ConfigGetTextArray(cfg_path, cfg_attachments);
607 return cfg_attachments;
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
void AddRotation(float add_rot)
int GetLinkedSceneObjectsCount()
void EditorShapeDeselect()
array< SceneObject > GetLinkedSceneObjects()
ref array< SceneObject > m_LinkedSceneObjects
SceneObject GetLinkedSceneObject(int i)
bool IsLinkedWithSceneObject(SceneObject scene_object)
void LinkEntityAI(EntityAI e)
void SetInitScript(string init_script)
EntityAI GetLinkedObject(int i)
TStringArray GetConfigAttachments()
void SetRotation(float rot)
ref array< int > m_LinkedSceneObjectsIndices
void SetPositionAsString(string string_pos)
void SetHealth(float value)
void EditorShapeUpdatePos()
void RemoveAttachment(EntityAI e)
void AddAttachment(string att_name)
void EditorLineAdd(SceneObject obj)
void EditorShapeSetColor(int color)
void LinkSceneObject(SceneObject scene_object, bool draw_line=true)
void EditorLineRemove(SceneObject obj)
string GetPositionAsString()
array< EntityAI > GetAttachments()
bool CanAttachment(EntityAI e)
void SetPosition(vector pos)
SceneObject Init(string obj_name, vector pos)
ref map< SceneObject, Shape > m_LinkedSceneObjectsShapes
void SceneObjectSynch(Param p)
string m_ObjectNameOrigin
void UnlinkSceneObject(SceneObject scene_object)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
array< string > TStringArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
const string STRING_EMPTY
PluginBase GetPlugin(typename plugin_type)