Detailed Description

This is a trigger property class.

It is capable of detecting when another entity (that has a pcmesh) enters or leaves an area defined by this trigger. In that case it can send messages to the entity that contains this property class and/or the entities that enter/leave the trigger area.

This property class supports the following actions (add prefix 'cel.trigger.action.' if you want to access this action through a message):

SetupTriggerSphere: parameters 'sector' (string), 'position' (vector3 or string (name of mapnode in that case)), and 'radius' (float). 'sector' is optional in case you have follow set to true.

SetupTriggerBox: parameters 'sector' (string), 'minbox' (vector3), and 'maxbox' (vector3). 'sector' is optional in case you have follow set to true.

SetupTriggerBeam: parameters 'sector' (string), 'start' (vector3), and 'end' (vector3). 'sector' is optional in case you have follow set to true.

You can also let pctrigger monitor only entities with a specific class. To disable this just use 0 as the class.

virtual void iPcTrigger::MonitorEntity

(

const char *

entityname

)

[pure virtual]

By default pctrigger will monitor all entities.

If you only want pctrigger to monitor one entity then you can give the name of that entity here. pctrigger will try to find the entity with that name and monitor it. To go back to monitoring all entities just call this function with a 0 name.

Set the number of milliseconds we delay before monitoring all entities again.

There is also a jitter parameter which will add a small random amount to that time to prevent all triggers trying to do the monitoring at once. By default this is set to 200/10 (i.e. roughly five times per second).

virtual void iPcTrigger::SetStrictChecking

(

bool

c

)

[pure virtual]

Set flag to let the trigger do strict checking for monitored entity.

If true an error will be reported if the entity is not there. Default on.