![]() |
Public API Reference |
This is a property class for damage emitting. More...
#include <propclass/damage.h>
Public Member Functions | |
| virtual void | AreaDamage (float radius)=0 |
| Do area damage. | |
| virtual void | BeamDamage (const csVector3 &direction, float maxdist)=0 |
| Do beam damage. | |
| virtual float | GetDamage () const =0 |
| Get the amount of damage. | |
| virtual const csVector3 & | GetDamagePosition () const =0 |
| Get the source position for the damage (only if explicitly set). | |
| virtual const char * | GetDamageSector () const =0 |
| Get the source sector for the damage (only if explicitly set). | |
| virtual const char * | GetDamageSource () const =0 |
| Get the source name for the damage. | |
| virtual const char * | GetDamageType () const =0 |
| Get the type of damage. | |
| virtual const char * | GetFallOff () const =0 |
| Get the damage falloff. | |
| virtual void | SetDamage (float amount)=0 |
| Set the amount of damage. | |
| virtual void | SetDamageLocation (const char *sectorname, const csVector3 &pos)=0 |
| Set the source location for the damage. | |
| virtual void | SetDamageSource (const char *source)=0 |
| Set the source name for the damage. | |
| virtual void | SetDamageType (const char *type)=0 |
| Set the type of damage. | |
| virtual void | SetFallOff (const char *f)=0 |
| Set the damage falloff ('constant', 'normal', or 'linear'). | |
| virtual void | SingleDamage (const char *target)=0 |
| Do single damage. | |
This is a property class for damage emitting.
Attach this property class to entities that can cause damage to other entities. Causing damage is basically a matter of sending a message to the affected entities. The affecting entity will have to handle the damage in whatever way is appropriate.
This property class can send out the following messages:
This property class supports the following actions (add prefix 'cel.damage.action.' if you want to access this action through a message):
This property class supports the following properties:
| virtual void iPcDamage::AreaDamage | ( | float | radius | ) | [pure virtual] |
Do area damage.
| virtual void iPcDamage::BeamDamage | ( | const csVector3 & | direction, |
| float | maxdist | ||
| ) | [pure virtual] |
Do beam damage.
| virtual float iPcDamage::GetDamage | ( | ) | const [pure virtual] |
Get the amount of damage.
| virtual const csVector3& iPcDamage::GetDamagePosition | ( | ) | const [pure virtual] |
Get the source position for the damage (only if explicitly set).
| virtual const char* iPcDamage::GetDamageSector | ( | ) | const [pure virtual] |
Get the source sector for the damage (only if explicitly set).
| virtual const char* iPcDamage::GetDamageSource | ( | ) | const [pure virtual] |
Get the source name for the damage.
| virtual const char* iPcDamage::GetDamageType | ( | ) | const [pure virtual] |
Get the type of damage.
| virtual const char* iPcDamage::GetFallOff | ( | ) | const [pure virtual] |
Get the damage falloff.
| virtual void iPcDamage::SetDamage | ( | float | amount | ) | [pure virtual] |
Set the amount of damage.
| virtual void iPcDamage::SetDamageLocation | ( | const char * | sectorname, |
| const csVector3 & | pos | ||
| ) | [pure virtual] |
Set the source location for the damage.
If this is not given then this property class will try to find the attached pcmesh.
| virtual void iPcDamage::SetDamageSource | ( | const char * | source | ) | [pure virtual] |
Set the source name for the damage.
If not set it is sent as the name of the entity setting the damage.
| virtual void iPcDamage::SetDamageType | ( | const char * | type | ) | [pure virtual] |
Set the type of damage.
| virtual void iPcDamage::SetFallOff | ( | const char * | f | ) | [pure virtual] |
Set the damage falloff ('constant', 'normal', or 'linear').
'normal' is default.
| virtual void iPcDamage::SingleDamage | ( | const char * | target | ) | [pure virtual] |
Do single damage.