|  | Nuclide
    Software Development Kit for id Technology (BETA) | 
This entity represents an ncRenderableEntity with interactive surface properties.
It can take damage and can handle variously different types of impact.
 
  
| Public Member Functions | |
| void | ncSurfacePropEntity (void) | 
| virtual void | Spawned (void) | 
| Called when the entity is fulled initialized. | |
| virtual void | SetModel (string) | 
| Sets the 3D model representation of the entity from a file path and name. | |
| virtual void | Save (float) | 
| Handles saving a copy of this entity to a given filehandle. | |
| virtual void | Restore (string, string) | 
| Similar to ncIO::SpawnKey() but for save-game fields. | |
| virtual void | RestoreComplete (void) | 
| Called when the entity has been successfully restored from a savegame file. | |
| virtual void | Respawn (void) | 
| Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state. | |
| virtual void | Input (entity, string, string) | 
| Called when we are being prompted by another object/function with an input message. | |
| virtual void | SpawnKey (string, string) | 
| This method handles entity key/value pairs on map load. | |
| virtual void | ParentUpdate (void) | 
| Called when we need to re-align the entity to our parent entity. | |
| virtual void | EvaluateEntity (void) | 
| Run each tic after physics are run to determine if we need to send updates over the network. | |
| virtual float | SendEntity (entity, float) | 
| Called by the engine whenever we need to send a client an update about this entity. | |
| virtual float | predraw (void) | 
| virtual void | ReceiveEntity (float, float) | 
| Client: Handles network updates from the server for the associated entity. | |
| nonvirtual bool | IsOnFire (void) | 
| Returns whether or not this entity is on fire. | |
| virtual void | Damage (entity, entity, ncDict, float, vector, vector) | 
| Applies damage to the entity. | |
| virtual void | DamageFeedback (entity, entity, int) | 
| Called when a different entity gets damaged by this entity. | |
| virtual void | Pain (entity, entity, int, vector, vector, int) | 
| Called whenever the entity receives damage. | |
| virtual void | Death (entity, entity, int, vector, vector, int) | 
| Called when the health is equal or below 0. | |
| virtual void | BreakModel (int, vector, int) | 
| Called when the health is equal or below 0. | |
| virtual bool | IsAlive (void) | 
| Returns whether or not the entity is alive. | |
| nonvirtual void | Ignite (entity, float, string) | 
| Sets the entity on fire. | |
| nonvirtual void | Extinguish (void) | 
| If the entity is on fire, it'll have it extinguished. | |
| nonvirtual bool | IsVulnerable (void) | 
| Returns whether the entity can be damaged. | |
| nonvirtual void | EnableAimAssist (void) | 
| Makes the entity visible to other entity their aim-assists. | |
| nonvirtual void | DisableAimAssist (void) | 
| Makes the entity invisible to other entity their aim-assists. | |
| nonvirtual void | MakeVulnerable (void) | 
| Makes the entity vulnerable if it wasn't already. | |
| nonvirtual void | MakeInvulnerable (void) | 
| Makes the entity invulnerable if it wasn't already. | |
| nonvirtual void | SetHealth (float) | 
| Sets the current health of the entity. | |
| nonvirtual void | SetMaxHealth (float) | 
| Sets the maximum amount of health the entity can have. | |
| nonvirtual float | GetHealth (void) | 
| Returns the current health of the entity. | |
| nonvirtual float | GetMaxHealth (void) | 
| Returns the maximum health the entity can have. | |
| nonvirtual void | AddBonusHealth (float) | 
| Adds bonus health to the entity. | |
| nonvirtual float | GetBonusHealth (void) | 
| Returns the bonus health of the entity. | |
| nonvirtual void | AddBonusArmor (float) | 
| Adds bonus armor to the entity. | |
| nonvirtual float | GetBonusArmor (void) | 
| Returns the bonus armor of the entity. | |
| nonvirtual void | SetArmor (float) | 
| Sets the current armor of the entity. | |
| nonvirtual float | GetArmor (void) | 
| Returns the current armor of the entity. | |
| nonvirtual void | SetMaxArmor (float) | 
| Sets the maximum amount of armor the entity can have. | |
| nonvirtual float | GetMaxArmor (void) | 
| Returns the maximum armor value the entity can have. | |
| nonvirtual float | TimeSinceDeath (void) | 
| Returns how many seconds have passed since we died. | |
| nonvirtual bool | CanBeDamaged (vector, vector) | 
| Returns whether this entity reacts to damage being inflicted. | |
| nonvirtual void | SetSurfaceData (string) | 
| Assigns the surface data of a given description onto this entity. | |
| nonvirtual void | SetPropData (string) | 
| Assigns the prop data of a given description onto this entity. | |
| nonvirtual bool | HasPropData (void) | 
| Returns if the entity has prop data information set. | |
| nonvirtual __variant | GetPropData (int) | 
| Returns a variable type of information about the entity's prop data. | |
| nonvirtual bool | HasSurfaceData (void) | 
| Returns if the entity has surface data information set. | |
| nonvirtual __variant | GetSurfaceData (int) | 
| Returns a variable type of information about the entity's surface data. | |
| virtual void | RenderFire (void) | 
| Called every frame to render a fire effect, but will only do so if the entity is burning. | |
| void ncSurfacePropEntity::ncSurfacePropEntity | ( | void | ) | 
| void ncSurfacePropEntity::AddBonusArmor | ( | float | bonusArmor | ) | 
Adds bonus armor to the entity.
That's the amount of armor it's allowed to go over max_armor. It'll decrease over time by itself and affect max_armor in the meantime. Maximum is 100.
| void ncSurfacePropEntity::AddBonusHealth | ( | float | bonusHealth | ) | 
Adds bonus health to the entity.
That's the amount of health it's allowed to go over max_health. It'll decrease over time by itself and affect max_health in the meantime. Maximum is 100.
| 
 | virtual | 
Called when the health is equal or below 0.
| bool ncSurfacePropEntity::CanBeDamaged | ( | vector | damageOrigin, | 
| vector | hitLocation ) | 
Returns whether this entity reacts to damage being inflicted.
| 
 | virtual | 
Applies damage to the entity.
Reimplemented in ncPlayer.
| 
 | virtual | 
Called when a different entity gets damaged by this entity.
| 
 | virtual | 
Called when the health is equal or below 0.
Reimplemented in func_breakable, func_guntarget, func_rot_button, ncActor, ncMonster, ncPhysicsEntity, ncPlayer, and ncProjectile.
| void ncSurfacePropEntity::DisableAimAssist | ( | void | ) | 
Makes the entity invisible to other entity their aim-assists.
| void ncSurfacePropEntity::EnableAimAssist | ( | void | ) | 
Makes the entity visible to other entity their aim-assists.
| 
 | virtual | 
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, func_tankmortar, func_tracktrain, func_vehicle, ncItem, ncMonster, ncPhysicsEntity, ncPlayer, ncProjectile, ncRagdoll, ncSpectator, ncVehicle, ncWeapon, prop_vehicle_driveable, and speaker.
| void ncSurfacePropEntity::Extinguish | ( | void | ) | 
If the entity is on fire, it'll have it extinguished.
| float ncSurfacePropEntity::GetArmor | ( | void | ) | 
Returns the current armor of the entity.
| float ncSurfacePropEntity::GetBonusArmor | ( | void | ) | 
Returns the bonus armor of the entity.
That is the amount of armor above max_armor.
| float ncSurfacePropEntity::GetBonusHealth | ( | void | ) | 
Returns the bonus health of the entity.
That is the amount of health above max_health.
| float ncSurfacePropEntity::GetHealth | ( | void | ) | 
Returns the current health of the entity.
| float ncSurfacePropEntity::GetMaxArmor | ( | void | ) | 
Returns the maximum armor value the entity can have.
| float ncSurfacePropEntity::GetMaxHealth | ( | void | ) | 
Returns the maximum health the entity can have.
| __variant ncSurfacePropEntity::GetPropData | ( | int | type | ) | 
Returns a variable type of information about the entity's prop data.
| __variant ncSurfacePropEntity::GetSurfaceData | ( | int | type | ) | 
Returns a variable type of information about the entity's surface data.
| bool ncSurfacePropEntity::HasPropData | ( | void | ) | 
Returns if the entity has prop data information set.
| bool ncSurfacePropEntity::HasSurfaceData | ( | void | ) | 
Returns if the entity has surface data information set.
| void ncSurfacePropEntity::Ignite | ( | entity | attacker, | 
| float | burnTime, | ||
| string | weaponDef ) | 
Sets the entity on fire.
| 
 | virtual | 
Called when we are being prompted by another object/function with an input message.
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, func_door, func_door_rotating, func_guntarget, func_plat, func_tracktrain, ncActor, ncItem, ncMonster, ncPlayer, ncProjectile, ncSquadMonster, and ncTalkMonster.
| 
 | virtual | 
Returns whether or not the entity is alive.
That is different from having health, as the entity may be a corpse that can be destroyed further.
Reimplemented in ncMonster.
| bool ncSurfacePropEntity::IsOnFire | ( | void | ) | 
Returns whether or not this entity is on fire.
| bool ncSurfacePropEntity::IsVulnerable | ( | void | ) | 
Returns whether the entity can be damaged.
| void ncSurfacePropEntity::MakeInvulnerable | ( | void | ) | 
Makes the entity invulnerable if it wasn't already.
| void ncSurfacePropEntity::MakeVulnerable | ( | void | ) | 
Makes the entity vulnerable if it wasn't already.
| 
 | virtual | 
Called whenever the entity receives damage.
Reimplemented in cycler, func_breakable, ncBot, ncBreakableBrush, ncMonster, ncPhysicsEntity, and ncProjectile.
| 
 | virtual | 
Called when we need to re-align the entity to our parent entity.
Reimplemented from ncEntity.
| 
 | virtual | 
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, ncClient, ncMonster, ncPlayer, ncProjectile, ncRagdoll, ncSpectator, and ncTalkMonster.
| 
 | virtual | 
Client: Handles network updates from the server for the associated entity.
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, func_tankmortar, func_tracktrain, func_vehicle, ncItem, ncMonster, ncPhysicsEntity, ncPlayer, ncProjectile, ncRagdoll, ncSpectator, ncTalkMonster, ncVehicle, ncWeapon, prop_vehicle_driveable, and speaker.
| 
 | virtual | 
Called every frame to render a fire effect, but will only do so if the entity is burning.
| 
 | virtual | 
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, button_target, cycler, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_physbox, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_tankmortar, func_tracktrain, func_vehicle, item_item_crate, monster_furniture, monster_generic, ncActor, ncBreakableBrush, ncItem, ncMonster, ncPhysicsEntity, ncPlayer, ncSpectator, ncTalkMonster, prop_dynamic, prop_physics, prop_static, prop_static, prop_vehicle_driveable, and speaker.
| 
 | virtual | 
Similar to ncIO::SpawnKey() but for save-game fields.
Whatever you write into file handles within your ncIO::Save() method needs to be read back in here. 
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_trackchange, func_tracktrain, func_vehicle, ncActor, ncClient, ncItem, ncMonster, ncMoverEntity, ncPhysicsEntity, ncPlayer, ncProjectile, ncSpectator, ncSquadMonster, ncTalkMonster, ncVehicle, ncWeapon, and speaker.
| 
 | virtual | 
| 
 | virtual | 
Handles saving a copy of this entity to a given filehandle.
Within you want to use the ncIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_trackchange, func_tracktrain, func_vehicle, ncActor, ncClient, ncItem, ncMonster, ncMoverEntity, ncPhysicsEntity, ncPlayer, ncProjectile, ncSpectator, ncSquadMonster, ncTalkMonster, ncVehicle, ncWeapon, and speaker.
| 
 | virtual | 
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, func_tankmortar, func_tracktrain, func_vehicle, ncItem, ncMonster, ncPhysicsEntity, ncPlayer, ncProjectile, ncRagdoll, ncSpectator, ncTalkMonster, ncVehicle, ncWeapon, prop_vehicle_driveable, and speaker.
| void ncSurfacePropEntity::SetArmor | ( | float | new_armor | ) | 
Sets the current armor of the entity.
| void ncSurfacePropEntity::SetHealth | ( | float | new_health | ) | 
Sets the current health of the entity.
| void ncSurfacePropEntity::SetMaxArmor | ( | float | new_armor | ) | 
Sets the maximum amount of armor the entity can have.
| void ncSurfacePropEntity::SetMaxHealth | ( | float | new_health | ) | 
Sets the maximum amount of health the entity can have.
| 
 | virtual | 
Sets the 3D model representation of the entity from a file path and name.
Reimplemented from ncEntity.
Reimplemented in ncPhysicsEntity.
| void ncSurfacePropEntity::SetPropData | ( | string | type | ) | 
Assigns the prop data of a given description onto this entity.
| void ncSurfacePropEntity::SetSurfaceData | ( | string | type | ) | 
Assigns the surface data of a given description onto this entity.
| 
 | virtual | 
Called when the entity is fulled initialized.
Any spawn key/value info pairs have already been dealt with. So now we can make full decisions on the entity. Always make sure to call super::Spawned(); inside your method when overriding. 
Reimplemented from ncEntity.
Reimplemented in ambient_generic, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_plat, func_pushable, func_tankmortar, func_trackchange, func_tracktrain, func_vehicle, ncActor, ncBreakableBrush, ncClient, ncItem, ncMonster, ncPhysicsEntity, ncPlayer, ncProjectile, ncSquadMonster, ncWeapon, prop_static, prop_vehicle_driveable, and speaker.
| 
 | virtual | 
This method handles entity key/value pairs on map load.
You can easily convert the strValue parameter using the ReadFloat etc. methods that are part of ncIO. 
Reimplemented from ncRenderableEntity.
Reimplemented in ambient_generic, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_physbox, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_tankmortar, func_trackchange, func_tracktrain, func_vehicle, item_item_crate, monster_furniture, ncActor, ncItem, ncMonster, ncMoverEntity, ncPhysicsEntity, ncProjectile, ncSquadMonster, ncTalkMonster, ncWeapon, prop_dynamic, prop_physics, prop_static, prop_vehicle_driveable, and speaker.
| float ncSurfacePropEntity::TimeSinceDeath | ( | void | ) | 
Returns how many seconds have passed since we died.
Will return -1 if not applicable.