Static Model

From Serious Sam Wiki
Revision as of 13:41, 6 May 2016 by Asdolg (Talk | contribs) (Created, Incomplete. Add more descriptions, create methods page, create event templates.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Editor model of CStaticModelEntity.

General information

Class: CStaticModelEntity

The Static model is an entity is used to show a model (since models can't directly be placed into a world). Unlike to Simple Model, Static model can change its properties (e.g. through Script) even when level already started.


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

Use outline model (CModelConfiguration)

To do: Add description

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.

Post effect (CShaderPreset)

To do: Add description

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.

Parent part (IDENT)

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

Auto start animation (IDENT)

Defines an animation which will be played on the model.

Sound fall off (FLOAT)

To do: Add description

Sound hot spot (FLOAT)

To do: Add description

Glue hulls to bones (BOOL)

To do: Add description

Death spawner (CBaseProperties)

To do: Add description

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.

Controlled from script (ENUM)

Defines if the entity can be controlled from any type of scripting.

Important (BOOL)

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

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

Support models (CStaticStackArray)

Contains models, which are support current model, i.e. if player will destroy support models, main model also will be destroyed.

Info 16x16.png Note: For destructible models only. Template:Active Template:Destruction Target

Spawn flags (LFLAGS)

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

Name (CString)

Defines the name of the Static model.

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

Platforms (LFLAGS)

Defines on which platforms the Static model is spawned.

Entity ID (ULONG)

Displays the entity ID of the Static model.

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

Script Functions


StaticModel Methods

CBaseEntity Methods
Name Parameters Return Data Type Description
Name Data Type
SEd3.5 or higher
DamageSource CString void To do: Add description
DamageType CString
WeaponIndex WeaponIndex
CharacterClass IDENT
Damage SLONG
SEd3.5 or higher
- void Enables ReceiveDamage script events (see below).
Warning 16x16.png Warning: This function disables native damage handling.
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.
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.
SEd3.5 or higher
- CWorld* To do: Add description
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
SEd3.5 or higher
Target Handle void To do: Add description
Amount SLONG
Weapon IDENT
DamageType CString
SEd3.5 only
Amount SLONG void To do: Add description
Weapon IDENT
DamageType CString
IsDestroyed - BOOL Returns 1 if entity is destroyed.
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.


Info 16x16.png Note: Add events.

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

Other Information

You do not need to make all models static. If you are not going to change model's properties during the game, use Simple Model instead.

Related Pages and Links