Skip to content

BlockTriggeredSDX

SphereII edited this page Sep 18, 2024 · 1 revision

BlockTriggeredSDX

TriggerSDX block is a TileEntity that is always active, much like the DecoAoe Block, but allows for more configurable options.

 

If you have a custom model, that includes an Animator object, you can allow it to animate when it's going stuff.

 

You have the option to animate it based just on proximity, or force the user to actually look at the block before triggering.

 

Regardless, when the animator is triggered, the following occur:

 

"On" bool parameter is triggered in the animator

"TriggerOn" trigger parameter is triggered in the animator.

 

If the RandomIndex property is set, then a random number between 0 and the value specified will be generated.

 

This random value is stored in the "RandomIndex" integer parameter in the animator.

 

 

<block name="myTestBlock">

<property name="Class" value="TriggeredSDX, SCore"/>

         <property name="AlwaysActive" value="true" />

 

      <!-- How far out the tile entity will re-scan to detect the player -->

      <property name="ActivationDistance" value="5" />

 

       <!-- this triggers a SetTrigger("On") when looked at -->

<property name="ActivateOnLook" value="true" />

 

<property name="RandomIndex" value="10" />

 

<!-- allows the block to be used as a storage device -->

      <property name="IsContainer" value="true" />

 

      <!-- Triggers the block if the buff buffCursed is active on the player, or if the player has a cvar called "cvar" with a value of 4, or if myOtherCvar is available, regardless of value -->

      <property name="ActivationBuffs" value="buffCursed,cvar(4),myOtherCvar" />

 

    <!-- This will read the cvarName1, and mycvarName2 from the player, if it's on the player,

        and sets Animator's matching value of the block. This only works if your block has an Animator.

    -->

      <property name="CopyCVarToAnimator" value="cvarName1;mycvarName2" />

</block>


Created with the Personal Edition of HelpNDoc: Make your documentation accessible on any device with HelpNDoc

0-SCore

Table of contents

Clone this wiki locally