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

4.4.4 Quest Definition Addon

With the `cel.addons.questdef' addon you can define quests for the quest manager (see section Quest Manager) directly in a world file. Here is an example:

 
<addon plugin="cel.addons.questdef">
  <quest name="SlideDoor">
    <state name="locked">
      <trigger type="trigger">
        <fireon entity="$this" />
        <reward type="debugprint" message="Door is closed!" />
      </trigger>
      <trigger type="inventory">
        <fireon entity="camera" child_entity="$key_ent" />
        <reward type="debugprint" message="The door is unlocked!" />
        <reward type="changeproperty" entity="$key_ent" pc="pcbillboard"
          property="cel.property.visible" bool="true" />
        <reward type="newstate" state="closed" />
      </trigger>
    </state>
    <state name="closed">
      <trigger type="trigger">
        <fireon entity="$this" />
        <reward type="debugprint" message="Door Opens!" />
        <reward type="sequencefinish" entity="$this" sequence="closedoor" />
        <reward type="sequence" entity="$this" sequence="opendoor" />
        <reward type="newstate" state="opened" />
      </trigger>
    </state>
    <state name="opened">
      <trigger type="trigger">
        <fireon entity="$this" leave="true" />
        <reward type="debugprint" message="Door Closes!" />
        <reward type="sequencefinish" entity="$this" sequence="opendoor" />
        <reward type="sequence" entity="$this" sequence="closedoor" />
        <reward type="newstate" state="closed" />
      </trigger>
    </state>
    <sequence name="opendoor">
      <op type="transform" duration="500" entity="$this">
        <v x="$openx" y="$openy" z="$openz" />
      </op>
    </sequence>
    <sequence name="closedoor">
      <op type="transform" duration="500" entity="$this">
        <v x="$closex" y="$closey" z="$closez" />
    </op>
    </sequence>
  </quest>
</addon>

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated using texi2html 1.76.