Ovis_Entity_Property_Set()
Abstract
Sets a property of an Ovis entity.
Syntax
Ovis_Entity_Property_Set (ent_ptr, property, value)
| Argument | Type | Description |
|---|---|---|
ent_ptr |
OvisT_Entity * |
Specifies the entity |
property |
OvisT_Entity_Property |
Property of interest, one of the values in Table 21 |
value |
const char * |
Property value, one of the values in Table 21 |
Return Type
OvisT_Compcode
OvisC_Compcode_Success if the property could be set; OvisC_Compcode_Failure otherwise.
Header
ovis_entity.h
Details
This function sets the state of the Ovis entity. Properties are used by 3D Network Visualizer to adjust the 3D representation of the entity if the 3D model supports it.
For example, a model might provide two versions that represent an intact and destroyed vehicle. In such a case, the intact representation would be used if damage is none or slight, and the destroyed one would be used for moderate or destroyed damage. On the other hand, if a model has four versions representing the four damage states, an appropriate version will be shown for each damage state.
Properties can be viewed in 3D Network Visualizer by right-clicking on an entity and viewing its information. Table 21 lists the symbolic constants representing entity properties and their values.
Table 21: Ovis Entity Properties and Property Values
| Property | Values |
|---|---|
OvisC_Entity_Property_Damage |
OVISC_ENTITY_PROPERTY_DAMAGE_NONE OVISC_ENTITY_PROPERTY_DAMAGE_SLIGHT OVISC_ENTITY_PROPERTY_DAMAGE_MODERATE OVISC_ENTITY_PROPERTY_DAMAGE_DESTROYED |
OvisC_Entity_Property_Trail_State |
OVISC_ENTITY_PROPERTY_TRAIL_NONE OVISC_ENTITY_PROPERTY_TRAIL_SMALL OVISC_ENTITY_PROPERTY_TRAIL_MEDIUM OVISC_ENTITY_PROPERTY_TRAIL_LARGE |
OvisC_Entity_Property_Hatch_State |
OVISC_ENTITY_PROPERTY_HATCH_NONE OVISC_ENTITY_PROPERTY_HATCH_CLOSED OVISC_ENTITY_PROPERTY_HATCH_POPPED OVISC_ENTITY_PROPERTY_HATCH_POPPED_PERSON OVISC_ENTITY_PROPERTY_HATCH_OPEN OVISC_ENTITY_PROPERTY_HATCH_OPEN_PERSON |
OvisC_Entity_Property_Lights_State |
OVISC_ENTITY_PROPERTY_LIGHTS_NONE OVISC_ENTITY_PROPERTY_LIGHTS_RUNNING OVISC_ENTITY_PROPERTY_LIGHTS_NAVIGATION OVISC_ENTITY_PROPERTY_LIGHTS_FORMATION |
OvisC_Entity_Property_Smoke_Plume |
OVISC_ENTITY_PROPERTY_ON OVISC_ENTITY_PROPERTY_OFF |
OvisC_Entity_Property_Engine_Smoke |
OVISC_ENTITY_PROPERTY_ON OVISC_ENTITY_PROPERTY_OFF |
OvisC_Entity_Property_Flames_Present |
OVISC_ENTITY_PROPERTY_ON OVISC_ENTITY_PROPERTY_OFF |
OvisC_Entity_Property_Camouflage_Type |
OVISC_ENTITY_PROPERTY_CAMOUFLAGE_FOREST OVISC_ENTITY_PROPERTY_CAMOUFLAGE_DESERT OVISC_ENTITY_PROPERTY_CAMOUFLAGE_WINTER |
OvisC_Entity_Property_Primary_Weapon OvisC_Entity_Property_Secondary_Weapon |
OVISC_ENTITY_PROPERTY_WEAPON_STATE_NONE OVISC_ENTITY_PROPERTY_WEAPON_STATE_STOWED OVISC_ENTITY_PROPERTY_WEAPON_STATE_DEPLOYED OVISC_ENTITY_PROPERTY_WEAPON_STATE_IN_FIRE |
OvisC_Entity_Property_Antenna_Raised |
OVISC_ENTITY_PROPERTY_ON OVISC_ENTITY_PROPERTY_OFF |
Example
OvisT_Entity * entity;
/* … entity created at some point */
Ovis_Entity_Property_Set (entity, OvisC_Entity_Property_Flames_Present,
OVISC_ENTITY_PROPERTY_ON);
Errors
- Entity is NIL.
Reference
- Use the function Ovis_Entity_Property_Get() to obtain the value of an entity's property.