iMessageRewardFactory Struct Reference
This interface is implemented by the reward that sends a message to some entity (the behaviour will get this message). More...
#include <tools/rewards.h>

Public Member Functions | |
| virtual bool | AddParameter (celDataType type, csStringID id, const char *value)=0 |
| Add a parameter to send with the message. | |
| virtual void | SetClassParameter (const char *ent_class)=0 |
| Set the name of the entity class on which this reward will work. | |
| virtual void | SetEntitiesParameter (const char *entities)=0 |
| Set the list of entities. | |
| virtual void | SetEntityParameter (const char *entity)=0 |
| Set the name of the entity. | |
| virtual void | SetIDParameter (const char *id)=0 |
| Set the message id. | |
Detailed Description
This interface is implemented by the reward that sends a message to some entity (the behaviour will get this message).
You can query this interface from the reward factory if you want to manually control this factory as opposed to loading its definition from an XML document.
The predefined name of this reward type is 'cel.rewards.message'.
In XML, factories recognize the following attributes on the 'op' node:
- entity: the name of the entity to send the message too.
- class: the name of an entity class. If this is used instead of the entity parameter, the reward will apply to all entities in the given entity class.
- id: id of the message to send.
Definition at line 532 of file rewards.h.
Member Function Documentation
| virtual bool iMessageRewardFactory::AddParameter | ( | celDataType | type, | |
| csStringID | id, | |||
| const char * | value | |||
| ) | [pure virtual] |
Add a parameter to send with the message.
- Parameters:
-
type is one of CEL_DATA_STRING, CEL_DATA_FLOAT, CEL_DATA_LONG, CEL_DATA_BOOL, or CEL_DATA_VECTOR3. id is the id of the parameter (calculated from iCelPlLayer->FetchStringID(name)). value is the value string or a parameter for it (starts with '$').
- Returns:
- true if the parameter was added or false if it was updated.
| virtual void iMessageRewardFactory::SetClassParameter | ( | const char * | ent_class | ) | [pure virtual] |
Set the name of the entity class on which this reward will work.
- Parameters:
-
ent_class is the name of the class or a parameter (starts with '$').
| virtual void iMessageRewardFactory::SetEntitiesParameter | ( | const char * | entities | ) | [pure virtual] |
Set the list of entities.
- Parameters:
-
entities is the list of entities or a parameter (starts with '$').
| virtual void iMessageRewardFactory::SetEntityParameter | ( | const char * | entity | ) | [pure virtual] |
Set the name of the entity.
- Parameters:
-
entity is the name of the entity or a parameter (starts with '$').
| virtual void iMessageRewardFactory::SetIDParameter | ( | const char * | id | ) | [pure virtual] |
Set the message id.
- Parameters:
-
id is the message id or a parameter (starts with '$').
The documentation for this struct was generated from the following file:
- tools/rewards.h
Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1
