Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--This is the trigger that applies the navpoint to PV users in a gametype I'm developing-->
- <!--I've edited out the other code to make it easier to see what I'm doing here-->
- <!--Current version of gametype available here: https://www.halowaypoint.com/en-us/games/halo4/fileshare/details/208ec55f-cb7e-44bd-84e0-31cbda96437c -->
- <Trigger execMode="OnEachPlayer" name="Trigger16">
- <Elements>
- <E type="Action" name="VariableOperation"> <!--Clear a 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"> <!--Pull player's AA-->
- <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- </E>
- <E type="Action" name="Branch"> <!--Branched because there are other AAs in the full script-->
- <Param type="VirtualTrigger">
- <VT type="VirtualTrigger">
- <E type="Condition" name="ObjectIsSameType" unionGroupID="-2"> <!--check if the AA is Promethean Vision-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- <Param type="ObjectTypeIndex">xray</Param>
- </E>
- <E type="Action" name="ApplyPlayerTraits"> <!--applies player traits with armor color over-ride and increased usage rate, making PV slightly shorter in duration-->
- <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />
- <Param type="PlayerTraitsReference">Promethean Vision</Param>
- </E>
- <E type="Action" name="ObjectSetNavpointVisibility"> <!--sets the navpoint to 'off' if it already exists, so if it fails the next condition it will be off-->
- <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
- <Param type="EntityFilter" filterType="NoOne" />
- </E>
- <E type="Condition" name="EquipmentIsInUse" unionGroupID="-2"> <!--check if the AA is currently active-->
- <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
- </E>
- <E type="Action" name="ObjectSetNavpoint"> <!--create the navpoint and associate it with the current player-->
- <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
- <Param type="NameIndex">navpoint_flood_player</Param>
- </E>
- <E type="Action" name="ObjectSetNavpointVisibility"> <!--set navpoint to be visible to all - basically switch it on-->
- <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
- <Param type="EntityFilter" filterType="Any" />
- </E>
- <E type="Action" name="ObjectSetPriority"> <!--set the range at which the navpoint is visible-->
- <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
- <Param type="NetworkPriority">High</Param>
- </E>
- </VT>
- </Param>
- </E>
- </Elements>
- </Trigger>
Advertisement
Add Comment
Please, Sign In to add comment