[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4.2 CelEntity Template Addon

With the ‘cel.addons.celentitytpl’ addon you can define your own entity templates directly in the world file. Here is an example on how to use that:

<addon plugin="cel.addons.celentitytpl" entityname="EntityTemplate">
    <propclass name="pcobject.mesh">
        <action name="SetMesh">
            <par name="name" string="$this" />
    <propclass name="pclogic.trigger">
        <property name="monitor" string="camera" />
        <action name="SetupTriggerSphere">
            <par name="sector" string="Inside" />
            <par name="position" vector="$pos" />
            <par name="radius" float="4" />
    <propclass name="pclogic.quest">
        <action name="NewQuest">
            <par name="name" string="MyQuest" />
        <property name="state" string="closed" />

You can define an entity template just like you would define an entity (see section CelEntity Addon) except that you can use parameters. The ‘$this’ parameter will be set to the name of the entity that is being created from the template. In addition you can also define other parameters at the time you create an entity from the template. In the example above the ‘$pos’ parameter is used.

This document was generated using texi2html 1.76.