Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
7ime

Retail
Switch/Switch_Door labels

1 post in this topic

I think that the switch and switch_door labels that I've added to the latest version of Mythic Slayer are pretty cool and hopefully you think so as well.  Here should be all of the code used to make it work for your viewing desire.

For those not aware, here is a crappy description:

Switch Label

   Does not work on explosives.

   if the spawn sequence is negative it will have a waypoint and will spawn a fusion coil contraption to blow up.

Switch_Door Label

when an object with the switch label is destroyed and has a spawn sequence with the same absolute value;

a positive spawn sequence will disappear. It will explode if less than 50.

a negative spawn sequence will appear.

a spawn sequence of negative 50 or less will disappear the next time the switch is destroyed

a spawn sequence of positive 50 or more will reappear the next time the switch is destroyed

Basically when the switch is destroyed something will happen to the switch label.

 

As usual, this tutorial is written using an earlier version than .5040 so if you're using the newer version you would have to change some things such as the Uint24's.

 

And of course you can some variables around if you've already used them for some reason but most of them are just used as scratch variables anyways.

 

1.  Add the following strings to the string table like so:

    <StringTable baseNameIndex="BaseName">      <String name="switch">        <String>switch</String>      </String>      <String name="switch_door">        <String>switch_door</String>      </String>      <String name="migration">        <String>migration</String>      </String>    </StringTable> 
2.  Add the following object filters:

    <ObjectFilters>      <Filter labelIndex="switch" name="switch" />      <Filter labelIndex="switch_door" name="switch_door" />      <Filter labelIndex="migration" name="migration"></Filter>    </ObjectFilters>
3.  Add the following object variables if you have not already:

 

    <GlobalVariables>      <Numeric>        <Var name="GlobalNumeric2" varRefType="Int16">1</Var>        <Var name="GlobalNumeric4" varRefType="Int16">0</Var>      </Numeric>      <Objects>        <var name="GlobalObject0" />        <var name="GlobalObject1" />        <var name="GlobalObject2"></var>        <var name="GlobalObject6" />      </Objects>    </GlobalVariables>    <ObjectVariables>      <Numeric>        <Var name="ObjectNumeric0" varRefType="Int16">0</Var>        <Var networkState="HighPriority" name="ObjectNumeric1" varRefType="Int16">0</Var>                       </Numeric>      <Objects>        <var name="ObjectObject0" />      </Objects>    </ObjectVariables>
4.  Add the following under an ObjectDeathEvent trigger like so:

 

      <Trigger trigType="ObjectDeathEvent" name="ObjectDeathEventTrigger">        <Elements>          <E type="Action" name="VariableOperation">            <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="GlobalObject1"></Param>            <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="_ObjectType13"></Param>            <Param type="OperationType">Set</Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="ObjectDeathEventTrigger_SubSwitch">                <Elements>                  <E type="Condition" name="ObjectMatchesFilter" unionGroupID="-2">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="_ObjectType13" />                    <Param type="ObjectFilterIndex">switch</Param>                  </E>                  <E type="Action" name="VariableOperation">                    <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="_ObjectType13">ObjectNumeric1</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                    <Param type="OperationType">Set</Param>                  </E>                  <E type="Action" name="VariableOperation">                    <Param type="VarReference" varRefKind="Custom" varRefType="Global.NumericVar">GlobalNumeric4</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="_ObjectType13"></Param>                    <Param type="OperationType">Set</Param>                  </E>                  <E type="Action" name="VariableOperation">                    <Param type="VarReference" varRefKind="Custom" varRefType="Global.NumericVar">GlobalNumeric4</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">-1</Param>                    <Param type="OperationType">Multiply</Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" execMode="OnObjectFilter" name="TriggerSwitchDoor_Sub1" objectFilter="switch_door">                        <Elements>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="GlobalObject1" />                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object"></Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Condition" name="Comparison" unionGroupID="-3">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Global.NumericVar">GlobalNumeric4</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ActivateTrigger">                            <Param type="TriggerReference">                              <T type="Trigger" trigType="Subroutine" name="TriggerSwitch_Sub1Delete">                                <Elements>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">-1</Param>                                    <Param type="ComparisonType">GreaterThan</Param>                                  </E>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">50</Param>                                    <Param type="ComparisonType">LessThan</Param>                                  </E>                                  <E type="Action" name="DetachObject">                                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                                  </E>                                  <E type="Action" name="ObjectKillInstantly">                                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                                    <Param type="Bool">False</Param>                                  </E>                                  <E type="Action" name="ObjectKillInstantly">                                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                                    <Param type="Bool">False</Param>                                  </E>                                  <E type="Action" name="DeleteObject">                                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                                  </E>                                </Elements>                              </T>                            </Param>                          </E>                          <E type="Action" name="ActivateTrigger">                            <Param type="TriggerReference">                              <T type="Trigger" trigType="Subroutine" name="TriggerSwitch_Sub50">                                <Elements>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">49</Param>                                    <Param type="ComparisonType">GreaterThan</Param>                                  </E>                                  <E type="Action" name="ActivateTrigger">                                    <Param type="TriggerReference">                                      <T type="Trigger" trigType="Subroutine" name="TriggerSwitch_SubDisappear">                                        <Elements>                                          <E type="Condition" name="Comparison" unionGroupID="-2">                                            <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                                            <Param type="ComparisonType">Equal</Param>                                          </E>                                          <E type="Action" name="VariableOperation">                                            <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                                            <Param type="OperationType">Set</Param>                                          </E>                                        </Elements>                                      </T>                                    </Param>                                  </E>                                  <E type="Action" name="ActivateTrigger">                                    <Param type="TriggerReference">                                      <T type="Trigger" trigType="Subroutine" name="TriggerSwitch_SubAppear">                                        <Elements>                                          <E type="Condition" name="Comparison" unionGroupID="-2">                                            <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                                            <Param type="ComparisonType">Equal</Param>                                          </E>                                          <E type="Condition" name="Comparison" unionGroupID="-2">                                            <Param type="VarReference" varRefKind="Object" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                                            <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="NONE"></Param>                                            <Param type="ComparisonType">NotEqual</Param>                                          </E>                                          <E type="Action" name="DetachObject">                                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                                          </E>                                          <E type="Action" name="DeleteObject">                                            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                                          </E>                                          <E type="Action" name="VariableOperation">                                            <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                                            <Param type="OperationType">Set</Param>                                          </E>                                        </Elements>                                      </T>                                    </Param>                                  </E>                                </Elements>                              </T>                            </Param>                          </E>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object"></Param>                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                            <Param type="ComparisonType">LessThan</Param>                          </E>                          <E type="Action" name="DetachObject">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                          </E>                          <E type="Action" name="ActivateTrigger">                            <Param type="TriggerReference">                              <T type="Trigger" trigType="Subroutine" name="TriggerSwitch_Sub1Delete">                                <Elements>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object"></Param>                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">-49</Param>                                    <Param type="ComparisonType">LessThan</Param>                                  </E>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                                    <Param type="ComparisonType">Equal</Param>                                  </E>                                  <E type="Action" name="DeleteObject">                                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                                  </E>                                </Elements>                              </T>                            </Param>                          </E>                          <E type="Action" name="VariableOperation">                            <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                            <Param type="OperationType">Set</Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="ObjectDeathEventTrigger_Sub2">                <Elements>                  <E type="Condition" name="ObjectMatchesFilter" unionGroupID="-2">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="_ObjectType13" />                    <Param type="ObjectFilterIndex">switch</Param>                  </E>                  <E type="Condition" name="ObjectMatchesFilter" unionGroupID="-3">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="_ObjectType13" />                    <Param type="ObjectFilterIndex">switch</Param>                  </E>                  <E type="Action" name="VariableOperation">                    <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="_ObjectType13">ObjectNumeric1</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                    <Param type="OperationType">Set</Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" execMode="OnEachObject" name="TriggerCivilian_Sub1">                        <Elements>                          <E type="Action" name="DistanceBetweenObjects">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject1" />                            <Param type="CustomReference" varRefType="Global.NumericVar">GlobalNumeric2</Param>                            <Param type="Bool">False</Param>                          </E>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="Global.NumericVar">GlobalNumeric2</Param>                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ObjectKillInstantly">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                            <Param type="Bool">False</Param>                          </E>                          <E type="Condition" name="ObjectIsSameType" unionGroupID="-2">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                            <Param type="ObjectTypeIndex">area</Param>                          </E>                          <E type="Condition" name="ObjectIsSameType" unionGroupID="-3">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                            <Param type="ObjectTypeIndex">stand</Param>                          </E>                          <E type="Condition" name="ObjectIsSameType" unionGroupID="-3">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                            <Param type="ObjectTypeIndex">destination</Param>                          </E>                          <E type="Action" name="DeleteObject">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                </Elements>              </T>            </Param>          </E>
5.  Add the following under a local trigger like so:

      <Trigger trigType="Local" name="LocalTrigger">        <Elements>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" execMode="OnObjectFilter" name="TriggerSwitchDoor" objectFilter="switch_door">                <Elements>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Object" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="NONE"></Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" name="TriggerSwitchDoor_Positive">                        <Elements>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">49</Param>                            <Param type="ComparisonType">GreaterThan</Param>                          </E>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="CreateObject">                            <Param type="ObjectTypeIndex">area</Param>                            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                            <Param type="ObjectFilterIndex">migration</Param>                            <Param type="CreateObjectFlags">NeverGarbage</Param>                            <Param type="UInt24">0</Param>                            <Param type="NameIndex">NONE</Param>                          </E>                          <E type="Action" name="AttachObject">                            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                            <Param type="UInt24">0</Param>                            <Param type="Bool">True</Param>                          </E>                          <E type="Action" name="DetachObject">                            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                          </E>                          <E type="Action" name="AttachObject">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                            <Param type="UInt24">0</Param>                            <Param type="Bool">True</Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                    <Param type="ComparisonType">LessThan</Param>                  </E>                  <E type="Action" name="CreateObject">                    <Param type="ObjectTypeIndex">area</Param>                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                    <Param type="ObjectFilterIndex">migration</Param>                    <Param type="CreateObjectFlags">NeverGarbage</Param>                    <Param type="UInt24">0</Param>                    <Param type="NameIndex">NONE</Param>                  </E>                  <E type="Action" name="AttachObject">                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="UInt24">0</Param>                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="DetachObject">                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                  </E>                  <E type="Action" name="AttachObject">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="UInt24">0</Param>                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="VariableOperation">                    <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric1</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                    <Param type="OperationType">Set</Param>                  </E>                </Elements>              </T>            </Param>          </E>        </Elements>      </Trigger>
6.  Add the following triggers like so:

      <Trigger execMode="OnObjectFilter" name="TriggerSwitch_Door" objectFilter="switch_door">        <Elements>          <E type="Condition" name="Comparison" unionGroupID="-2">            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">-1</Param>            <Param type="ComparisonType">GreaterThan</Param>          </E>          <E type="Condition" name="Comparison" unionGroupID="-2">            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">50</Param>            <Param type="ComparisonType">LessThan</Param>          </E>          <E type="Condition" name="Comparison" unionGroupID="-2">            <Param type="VarReference" varRefKind="Object" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>            <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="NONE"></Param>            <Param type="ComparisonType">Equal</Param>          </E>          <E type="Action" name="CreateObject">            <Param type="ObjectTypeIndex">bomb</Param>            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>            <Param type="ObjectFilterIndex">NONE</Param>            <Param type="CreateObjectFlags">0</Param>            <Param type="UInt24">0</Param>            <Param type="NameIndex">NONE</Param>          </E>          <E type="Action" name="ObjectScale">            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>            <Param type="CustomReference" varRefType="Int16">1</Param>          </E>          <E type="Action" name="AttachObject">            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />            <Param type="UInt24">0</Param>            <Param type="Bool">True</Param>          </E>          <E type="Action" name="ObjectSetInteractionFilter">            <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>            <Param type="EntityFilter" filterType="None" />          </E>        </Elements>      </Trigger>      <Trigger execMode="OnObjectFilter" name="TriggerSwitch" objectFilter="switch">        <Elements>          <E type="Condition" name="Comparison" unionGroupID="-2">            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>            <Param type="ComparisonType">LessThan</Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="TriggerSwitchDoor_Positive">                <Elements>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Object" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="NONE"></Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric0</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="ObjectScale">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="CustomReference" varRefType="Int16">1</Param>                  </E>                  <E type="Action" name="CreateObject">                    <Param type="ObjectTypeIndex">stand</Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject6"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                    <Param type="ObjectFilterIndex">migration</Param>                    <Param type="CreateObjectFlags">0</Param>                    <Param type="UInt24">0</Param>                    <Param type="NameIndex">NONE</Param>                  </E>                  <E type="Action" name="ObjectCopyRotation">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject6"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="AttachObject">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject6"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="UInt24">0</Param>                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="DetachObject">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject6"></Param>                  </E>                  <E type="Action" name="CreateObject">                    <Param type="ObjectTypeIndex">fusion_coil</Param>                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                    <Param type="ObjectFilterIndex">migration</Param>                    <Param type="CreateObjectFlags">0</Param>                    <Param type="UInt24">0</Param>                    <Param type="NameIndex">NONE</Param>                  </E>                  <E type="Action" name="ObjectCopyRotation">                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="CreateObject">                    <Param type="ObjectTypeIndex">land_mine</Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject2"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                    <Param type="ObjectFilterIndex">migration</Param>                    <Param type="CreateObjectFlags">0</Param>                    <Param type="UInt24">0</Param>                    <Param type="NameIndex">NONE</Param>                  </E>                  <E type="Action" name="ObjectCopyRotation">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject2"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="AttachObject">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject2"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject6" />                    <Param type="UInt24">4</Param>                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="AttachObject">                    <Param type="ObjectReference" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject2" />                    <Param type="UInt24">248</Param>                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="ObjectScale">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject2" />                    <Param type="CustomReference" varRefType="Int16">55</Param>                  </E>                  <E type="Action" name="AttachObject">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="GlobalObject6"></Param>                    <Param type="UInt24">2</Param>                    <Param type="Bool">True</Param>                  </E>                  <E type="Action" name="ObjectSetNavpointVisibility">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="EntityFilter" filterType="Any" />                  </E>                  <E type="Action" name="ObjectSetNavpointIcon">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="NavpointIconData" navpointIconIndex="21"></Param>                  </E>                  <E type="Action" name="ObjectSetPriority">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="NetworkPriority">Low</Param>                  </E>                  <E type="Action" name="ObjectSetDistanceRange">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                    <Param type="CustomReference" varRefType="Int16">0</Param>                    <Param type="CustomReference" varRefType="Int16">2</Param>                  </E>                  <E type="Action" name="VariableOperation">                    <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric0</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                    <Param type="OperationType">Set</Param>                  </E>                  <E type="Action" name="ObjectSetInteractionFilter">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                    <Param type="EntityFilter" filterType="None" />                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Condition" name="Comparison" unionGroupID="-2">            <Param type="VarReference" varRefKind="Object" varRefType="Object.ObjectVar" dataType="Iterator.Object">ObjectObject0</Param>            <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="NONE"></Param>            <Param type="ComparisonType">Equal</Param>          </E>          <E type="Condition" name="Comparison" unionGroupID="-2">            <Param type="VarReference" varRefKind="Custom" varRefType="Object.NumericVar" dataType="Iterator.Object">ObjectNumeric0</Param>            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>            <Param type="ComparisonType">Equal</Param>          </E>          <E type="Action" name="ObjectKillInstantly">            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>            <Param type="Bool">False</Param>          </E>        </Elements>      </Trigger>
7.  You should probably also add this Host Migration trigger like so:

      <Trigger trigType="HostMigration" name="HostMigrationTrigger">        <Elements>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" execMode="OnObjectFilter" name="TriggerMigration" objectFilter="migration">                <Elements>                  <E type="Action" name="DeleteObject">                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                  </E>                </Elements>              </T>            </Param>          </E>        </Elements>      </Trigger> 
8.  And don't forget to add the following entry points at the bottom of it all:

    <EntryPoints>      <ObjectDeathEvent>ObjectDeathEventTrigger</ObjectDeathEvent>      <HostMigration>HostMigrationTrigger</HostMigration>      <Local>LocalTrigger</Local>    </EntryPoints>
Alright hopefully I didn't forget anything.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0