![]() |
Public API 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 void | AddParameter (celDataType type, csStringID id, const char *name, 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 | SetEntityParameter (const char *entity)=0 |
| Set the name of the entity. | |
| virtual void | SetIDParameter (const char *id)=0 |
| Set the message id. | |
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:
| virtual void iMessageRewardFactory::AddParameter | ( | celDataType | type, |
| csStringID | id, | ||
| const char * | name, | ||
| const char * | value | ||
| ) | [pure virtual] |
Add a parameter to send with the message.
| 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)). |
| name | is the name of the parameter. |
| value | is the value string or a parameter for it (starts with '$'). |
| virtual void iMessageRewardFactory::SetClassParameter | ( | const char * | ent_class | ) | [pure virtual] |
Set the name of the entity class on which this reward will work.
| ent_class | is the name of the class or a parameter (starts with '$'). |
| virtual void iMessageRewardFactory::SetEntityParameter | ( | const char * | entity | ) | [pure virtual] |
Set the name of the entity.
| 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.
| id | is the message id or a parameter (starts with '$'). |