Simple Model

From Serious Sam Wiki
Jump to: navigation, search
Editor model of CSimpleModelEntity.

General information

Class: CSimpleModelEntity

The Simple model is an entity is used to show a model (since models can't directly be placed into a world). Often, there are many more Simple models in a world than all other models combined.

Properties

Contains all model settings such as meshes, anim host, mechanisms and so on.


Stretch (Vector3f)

Defines model's mesh relative size.


Static model scheme override (CStaticModelScheme)

Defines entity's integration with the world.


Model addon creation scheme (CModelAddonCreationScheme)

Allows to exclude addons or hiding spots from the current entity.


Shader modifiers (CShaderModifiersList)

Contains all modifiers employed to the entity.


Cast shadow (BOOL)

Defines if model will make shadows.


Ignore distant lights (BOOL)

Defines if Distant Lights will affect the model.


Static distant light scaler (FLOAT)

To do: Add description


Export to GI (BOOL)

To do: Add description


Can be occluded (BOOL)

To do: Add description


Visible in mirrors (BOOL)

Defines if model will be seen in Mirrors (e.g., you will not see the model in water mirror if this property set to false)

.

Mechanism (IDENT)

To do: Add description


Visibility culling distance (FLOAT)

The distance on which the model starts to fade out of visibility.


Platform cull distances (CPlatformCullDistances)

Defines visibility culling distance for each platform.


Fade length (FLOAT)

Defines length on which model will be fully culled.


Auto start animation (IDENT)

Defines an animation which will be played on the model.


Info 16x16.png Note: Simple model can not change its animation or remove it. If you set animation here, it will be played until level end reached.

Disable destruction (BOOL)

Defines if model can be destructed.


Ignored by navigation (BOOL)

Defines if model will be considered while navigation mesh will be baking.


Rendering group (CRenderingGroupProperties)

Contains a pointer to Rendering Group.


Cached texture size (PIX)

To do: Add description


Custom visibility sectors (CString)

Contains all sectors where model should be seen.


Forced probe light (CProbeLightProperties)

Contains a pointer to Probe Light.


Private probe light (CProbeResource)

Contains probe light which will only affect current model.


Lighting exceptions (CLightingExceptor)

Defines which light sources will affect model and which will not.


Ignored by walking support (BOOL)

To do: Add description


Important (BOOL)

If set, will have flag in entity list. Does not have any use in game.


Control by macro (BOOL)

Seems to be unusable.


Parent part (IDENT)

If the parent has more than one moving part this property defines which part the Simple model is parented to.


Sound fall off (FLOAT)

Seems to be unusable.


Sound hot spot (FLOAT)

Seems to be unusable.


Glue hulls to bones (BOOL)

Seems to be unusable.


Death spawner (CBaseProperties)

Seems to be unusable.


Spawn flags (LFLAGS)

Defines in which difficulty levels and game types the Simple model is spawned.


Name (CString)

Defines the name of the Simple model.


Defines a entity pointer to the parent of the Simple model.


Platforms (LFLAGS)

Defines on which platforms the Simple model is spawned.


Entity ID (ULONG)

Displays the entity ID of the Simple model.


Info 16x16.png Note: Entity ID cannot be edited.

Script Functions

Methods

Info 16x16.png Note: CSimpleModelEntity does not have native methods.

CBaseEntity Methods
Name Parameters Return Data Type Description
Name Data Type
ApplyDamageTool
SEd3.5 or higher
DamageSource CString void To do: Add description
DamageType CString
WeaponIndex WeaponIndex
CharacterClass IDENT
Damage SLONG
EnableReceiveDamageScriptEvent
SEd3.5 or higher
- void Enables ReceiveDamage script events (see below).
Warning 16x16.png Warning: This function disables native damage handling.
EnableTouchAutoMoveTarget
SEd4.0 only
Enabled BOOL void Enables the entity to become an auto move target.
GetAngularVelocity - Vector3f Returns angular velocity of the entity in Vector3f format.
GetAttachmentAbsolutePlacement Attachment IDENT QuatVect Returns placement of attachment in relation to World Spawn in QuatVect format.
GetAttachmentRelativePlacement Attachment IDENT QuatVect Returns placement of attachment in relation to entity in QuatVect format.
GetClassName
SEd3.5 or higher
- CString Returns classname in CString format.
GetLinearVelocity - Vector3f Returns linear velocity of entity in Vector3f format.
GetName - CString Returns the name of the entity in CString format.
GetParent Name IDENT Handle Returns a CBaseEntity handle of the parent of the entity.
GetPlacement - QuatVect Returns position and orientation of the entity in QuatVect format.
GetWorld
SEd3.5 or higher
- CWorld* To do: Add description
GetWorldInfo
SEd3.5 or higher
- CWorldInfoEntity* To do: Add description
InflictDamage Amount SLONG void Inflicts damage to entity.
InflictDamageOfType Amount SLONG void Inflicts damage of a specified damage type to entity.
DamageType CString
InflictDamageToTarget
SEd3.5 or higher
Target Handle void To do: Add description
Amount SLONG
Weapon IDENT
DamageType CString
InflictWeaponDamage
SEd3.5 only
Amount SLONG void To do: Add description
Weapon IDENT
DamageType CString
IsDestroyed - BOOL Returns 1 if entity is destroyed.
IsReceiveDamageScriptEventEnabled
SEd3.5 or higher
- BOOL Returns 1 if ReceiveDamageScriptEvent is enabled (see above).
SetAngularVelocity AngVelocity Vector3f void Sets angular velocity of entity to the specified Vector3f value.
SetLinearVelocity Velocity Vector3f void Sets the velocity of the entity to the specifed Vector3f values.
SetPlacement Placement QuatVect void Sets position and orientation of the entity to the specified QuatVect values.

Events

Destroyed
Triggers when the Simple model is destroyed.
EntityDeleted → SEd3.5 or higher
Triggers when the Simple model is deleted.
ReceiveDamage → SEd3.5 or higher
Triggers when the Simple model receives damage.
Info 16x16.png Note: This event requires enabling via EnableReceiveDamageScriptEvent method.

Other Information

Simple model can not change animations or be scripted. Use it if you are not going to change any of its properties when level is already started (but if you want to do it - use Static Model).


Related Pages and Links