iPropertyChangeQuestTriggerFactory Struct Reference
This interface is implemented by the trigger that fires when a certain property passes a test on some value. More...
#include <tools/questmanager.h>

Public Member Functions | |
virtual void | SetEntityParameter (const char *entity, const char *tag=0)=0 |
Set the name of the entity containing the pcproperties property class on which this trigger will fire. | |
virtual void | SetOnChangeOnly (bool on_change)=0 |
Set whether the trigger will fire only on an actual change (so the condition has to become true), or whenever the condition is met (even initially). | |
virtual void | SetOperationParameter (const char *op)=0 |
Set the operation this trigger will test with. | |
virtual void | SetPropertyParameter (const char *prop)=0 |
Set the name of the property on which this trigger will fire. | |
virtual void | SetValueParameter (const char *value)=0 |
Set the value of the property on which this trigger will fire. |
Detailed Description
This interface is implemented by the trigger that fires when a certain property passes a test on some value.
Test can be any of the operations below. You can query this interface from the trigger factory if you want to manually control this factory as opposed to loading its definition from an XML document.
The predefined name of this trigger type is 'cel.questtrigger.propertychange'.
In XML, factories recognize the following attributes on the 'fireon' node:
- entity: the name of the entity that contains the pcproperties property class.
- entity_tag: optional tag used to find the right property class from the entity.
- property: the name of the property.
- value: the value on which this trigger will fire. If this value is not given then the trigger will fire whenever the value
- operation: the value on which this trigger will test. If this value is not given then the trigger will fire on equality.
- onchange: if true the trigger will fire only when the condition becomes true (so it has to be initially false, and become true after that), otherwise the trigger will fire whenever the condition is met (even initially).
Valid operations:
- eq: Equals (==).
- lt: Lower than (<).
- gt: Greater than (>).
- ne: Not equal (!=).
- le: Lower or equal (<=).
- ge: Greater or equal (>=). Note string and bool properties can only be tested with "ne" or "eq", as greater or lesser doesn't really make sense for them.
Definition at line 1065 of file questmanager.h.
Member Function Documentation
virtual void iPropertyChangeQuestTriggerFactory::SetEntityParameter | ( | const char * | entity, | |
const char * | tag = 0 | |||
) | [pure virtual] |
Set the name of the entity containing the pcproperties property class on which this trigger will fire.
- Parameters:
-
entity is the name of the entity or a parameter (starts with '$'). tag is the optional tag of the entity or a parameter (starts with '$').
virtual void iPropertyChangeQuestTriggerFactory::SetOnChangeOnly | ( | bool | on_change | ) | [pure virtual] |
Set whether the trigger will fire only on an actual change (so the condition has to become true), or whenever the condition is met (even initially).
- Parameters:
-
on_change true for reporting only on change.
virtual void iPropertyChangeQuestTriggerFactory::SetOperationParameter | ( | const char * | op | ) | [pure virtual] |
Set the operation this trigger will test with.
If operation is not set equality will be checked.
- Parameters:
-
op one of: eq, lt, gt, ne, le, ge. See above for more details.
virtual void iPropertyChangeQuestTriggerFactory::SetPropertyParameter | ( | const char * | prop | ) | [pure virtual] |
Set the name of the property on which this trigger will fire.
- Parameters:
-
prop is the name of the property or a parameter (starts with '$').
virtual void iPropertyChangeQuestTriggerFactory::SetValueParameter | ( | const char * | value | ) | [pure virtual] |
Set the value of the property on which this trigger will fire.
If this value is not given the the trigger will fire whenever the value changes.
- Parameters:
-
value is the value or a parameter (starts with '$').
The documentation for this struct was generated from the following file:
- tools/questmanager.h
Generated for CEL: Crystal Entity Layer 1.4.1 by doxygen 1.7.1