Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--Single-use AAs; Auto Turret and Regen Field-->
- <PlayerVariables> <!--implement this immediately after </GlobalVariables>-->
- <Numeric>
- <Var networkState="HighPriority" name="PlayerNumeric0" varRefType="Int16">0</Var>
- </Numeric>
- </PlayerVariables>
- <Trigger execMode="OnEachPlayer" name="Trigger20"> <!--change the trigger number as necessary-->
- <Elements>
- <E type="Action" name="VariableOperation"> <!--clear scratch-->
- <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="NONE" />
- <Param type="OperationType">Set</Param>
- </E>
- <E type="Action" name="PlayerGetArmorAbility"> <!--get reference to player's AA-->
- <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- </E>
- <E type="Action" name="Branch"> <!--flagged AA deletion-->
- <Param type="VirtualTrigger">
- <VT type="VirtualTrigger">
- <E type="Condition" name="Comparison" unionGroupID="-2"> <!--if usage flag active-->
- <Param type="VarReference" varRefKind="Custom" varRefType="Player.NumericVar" dataType="Iterator.Player">PlayerNumeric0</Param>
- <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>
- <Param type="ComparisonType">Equal</Param>
- </E>
- <E type="Condition" name="ObjectIsSameType" unionGroupID="-2"> <!--and the AA is auto turret-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- <Param type="ObjectTypeIndex">auto_turret</Param>
- </E>
- <E type="Condition" name="ObjectIsSameType" unionGroupID="-3"> <!--or the AA is regen-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- <Param type="ObjectTypeIndex">regen_field_equipment</Param>
- </E>
- <E type="Action" name="Branch">
- <Param type="VirtualTrigger">
- <VT type="VirtualTrigger">
- <E type="Condition" name="EquipmentIsInUse" unionGroupID="-2" invert="True"> <!--if equipment is not in use-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- </E>
- <E type="Action" name="DeleteObject"> <!--delete referenced object/the player's AA-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- </E>
- <E type="Action" name="VariableOperation"> <!--reset player's usage flag-->
- <Param type="VarReference" varRefKind="Custom" varRefType="Player.NumericVar" dataType="Iterator.Player">PlayerNumeric0</Param>
- <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>
- <Param type="OperationType">Set</Param>
- </E>
- </VT>
- </Param>
- </E>
- </VT>
- </Param>
- </E>
- <E type="Action" name="Branch"> <!--flag in-use AAs-->
- <Param type="VirtualTrigger">
- <VT type="VirtualTrigger">
- <E type="Condition" name="EquipmentIsInUse" unionGroupID="-2"> <!--if the equipment is in use-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- </E>
- <E type="Condition" name="ObjectIsSameType" unionGroupID="-2"> <!--and it's an autoturret-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- <Param type="ObjectTypeIndex">auto_turret</Param>
- </E>
- <E type="Condition" name="ObjectIsSameType" unionGroupID="-3"> <!--or it's regen-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- <Param type="ObjectTypeIndex">regen_field_equipment</Param>
- </E>
- <E type="Action" name="VariableOperation"> <!--activate usage flag-->
- <Param type="VarReference" varRefKind="Custom" varRefType="Player.NumericVar" dataType="Iterator.Player">PlayerNumeric0</Param>
- <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>
- <Param type="OperationType">Set</Param>
- </E>
- </VT>
- </Param>
- </E>
- </Elements>
- </Trigger>
- <!--Additional AAs - thruster works okay but the rest need additional code to work properly with this script-->
- <!-- <Param type="ObjectTypeIndex">jet_pack_equipment</Param> -->
- <!-- <Param type="ObjectTypeIndex">thruster_pack_equipment</Param> -->
- <!-- <Param type="ObjectTypeIndex">xray</Param> --> <!--Promethean vision-->
- <!-- <Param type="ObjectTypeIndex">reflective_shield</Param> --> <!--Hardlight shield-->
- <!-- <Param type="ObjectTypeIndex">hologram_equipment</Param> --> <!--DOES NOT WORK WITH THIS SCRIPT-->
- <!-- <Param type="ObjectTypeIndex">active_camo_equipment</Param> -->
Advertisement
Add Comment
Please, Sign In to add comment