Sequence Manager XML

Example XML:

<table>
  <unit>
    <sequence editable_state="true/false" name="''" triggable="true/false">
      
    </sequence>
  </unit>
</table>

Important: Strings need to have ' at the beginning and end, otherwise they do not work.

Sequences

Hitboxes

You can take any body from your .object and use it as a hitbox to trigger sequences.

<table>
  <unit>
    <body name="''">
      <endurance>
        <run_sequence name="''"/>
      </endurance>
    </body>
  </unit>
</table>

Filters and Variables

You can define variables and filter sequences based on the value of a variable.

<table>
  <unit>
    <variables>
    	<your_variable_name value="#"/>
    </variables>
    
    <filter name="'your_filter_name'">
      <check value="vars.your_variable_name == #"/>
    </filter>
  </unit>
</table>

Add filter="your_filter_name" to a sequence to make it only run if the variable and the filter have the same value.

Use <set_variables your_variable_name="#"/> to change variable values.

Example:
<table>
  <unit>
    <variables>
    	<var_loot_type value="0"/>
    </variables>
    
    <filter name="'loot_money'">
      <check value="vars.var_loot_type == 1"/>
    </filter>
    
    <filter name="'loot_gold'">
      <check value="vars.var_loot_type == 2"/>
    </filter>
    
    <sequence editable_state="true" name="'set_loot_money'" triggable="true">
      <set_variables var_loot_type="1"/>
    </sequence>
    <sequence editable_state="true" name="'set_loot_gold'" triggable="true">
      <set_variables var_loot_type="2"/>
    </sequence>
    
    <sequence editable_state="true" name="'spawn_loot'" triggable="true">
      <spawn_unit filter="'loot_money'" name="'units/pd2_dlc1/vehicles/str_vehicle_truck_gensec_transport/spawn_deposit/spawn_money'".../>
      <spawn_unit filter="'loot_gold'" name="'units/pd2_dlc1/vehicles/str_vehicle_truck_gensec_transport/spawn_deposit/spawn_gold'".../>
    </sequence>
    
  </unit>
</table>

To be continued...

(old notes from rex)

Vector3 form in sequence manager: v(0, 0, 0)

MaterialElement


pick random sequence thingy <run_sequence name="'sequence_'..pick('1','2','3')"


Revision #15
Created 18 July 2021 03:42:35 by Rex
Updated 23 April 2024 18:39:41 by soosh.exe