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

General information

Class: CMirrorEntity

The Mirror is an entity used to make refraction and reflection on models.


Reflection (CCanvasTexture)

Texture used for reflection rendering. For more information see Shader Modifiers.

Refraction (CCanvasTexture)

Texture used for refraction rendering. For more information see Shader Modifiers.

Portal marker (CPortalMarkerProperties)

To do: Add description

Custom visibility sectors (CString)

Defines sectors in which reflection/refraction is visible.

Max distance (FLOAT)

Defines the maximum possible distance from which the player is able to see reflection/refraction.

Mirror levels per platform (CStaticStackArray)

Contains mirror levels for each platform, i.e. what will be visible in mirrors.

Spawn flags (LFLAGS)

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

Name (CString)

Defines the name of the Mirror.

Defines a entity pointer to the parent of the Mirror.

Platforms (LFLAGS)

Defines on which platforms the Mirror is spawned.

Entity ID (ULONG)

Displays the entity ID of the Mirror.

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

Script Functions


Info 16x16.png Note: CMirrorEntity does not have native 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.


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

Setting up a simple mirror

To set up a simple working mirror:

  • 1. Create a model and set a 'Ripple' shader for it.
  • 2. Create a Mirror entity and place it over your model.
  • 3. In Mirror's entity on 'reflection texture' field click '(none)', then select 'New' => 'CCanvasTexture'.
  • 4. Select the newly made field and press Ctrl+C.
  • 5. Select your model, expand 'Shader modifiers' field and create a new 'CConstantShaderModifier'.
  • 6. In its Value create new 'CShaderArgValTexure'. Then click 'Pointer' field and press Ctrl+V.
  • 7. In 'Destination' field type 'reflection texture'.

This should make a working mirror for you.

Related Pages and Links