[BlankProject] Entity Properties

#1
Hi

I have nothing found in the documentation to change propertis of the Entities

special for the Editor to show an icon or/and to set an default object to visualize the position of the entity(only in editor).
For example the Spawn Point of the old GameSDK system.

The only thing i found out is that in the GamePlugin.h

Code: Select all

template<class T> static void RegisterEntityWithDefaultComponent(const char *name) { IEntityClassRegistry::SEntityClassDesc clsDesc; clsDesc.sName = name; //clsDesc.editorClassInfo.sCategory = "" //clsDesc.editorClassInfo.sIcon = "" static CObjectCreator<T> _creator; gEnv->pGameFramework->GetIGameObjectSystem()->RegisterExtension(name, &_creator, &clsDesc); T::SetExtensionId(gEnv->pGameFramework->GetIGameObjectSystem()->GetID(name)); }
is is posibile to change the category
but there is also an Icon param to change but i have found no description for the parameters of the string is this a path to an icon or a name of an icon. anybody in idee.

Re: [BlankProject] Entity Properties

#3
The RegisterNoScriptGameObject template function is legacy code used to register game objects that wish to use the Lua Script Table for entity properties. Its format hails from how Lua scripts were used to change entity properties back when Crysis was being made without requiring a recompilation of the game library. As of 5.3, the only class that used it was extracted from GameZero and converted into a plugin using IEntityComponent and IEntityPropertyGroup. If you still want to use RegisterNoScriptGameObject, pseudocode as follows:

Code: Select all

//RegisterPropertiesFunction if(tables.pPropertiesTable) { int derp = 0; tables.pPropertiesTable->SetValue("iIntegerProperty", derp); } if(tables.pEditorTable) { tables.pEditorTable->SetValue("Icon", "prompt.bmp"); //turns icon into Editor/ObjectIcons/prompt.bmp }
If you want to see the working example, find 5.0, 5.1, or 5.2 source code and evaluate GameZero's GeomEntity.cpp file

Who is online

Users browsing this forum: No registered users and 1 guest