Gord

PV Waypoint Trigger

Nov 7th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.36 KB | None | 0 0
  1.  <!--This is the trigger that applies the navpoint to PV users in a gametype I'm developing-->
  2.  <!--I've edited out the other code to make it easier to see what I'm doing here-->
  3.  <!--Current version of gametype available here: https://www.halowaypoint.com/en-us/games/halo4/fileshare/details/208ec55f-cb7e-44bd-84e0-31cbda96437c -->
  4.  
  5. <Trigger execMode="OnEachPlayer" name="Trigger16">
  6.   <Elements>
  7.     <E type="Action" name="VariableOperation"> <!--Clear a scratch-->
  8.       <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
  9.       <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="NONE" />
  10.       <Param type="OperationType">Set</Param>
  11.     </E>
  12.     <E type="Action" name="PlayerGetArmorAbility"> <!--Pull player's AA-->
  13.       <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />
  14.       <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
  15.     </E>
  16.     <E type="Action" name="Branch"> <!--Branched because there are other AAs in the full script-->
  17.       <Param type="VirtualTrigger">
  18.         <VT type="VirtualTrigger">
  19.           <E type="Condition" name="ObjectIsSameType" unionGroupID="-2"> <!--check if the AA is Promethean Vision-->
  20.             <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
  21.             <Param type="ObjectTypeIndex">xray</Param>
  22.           </E>
  23.           <E type="Action" name="ApplyPlayerTraits"> <!--applies player traits with armor color over-ride and increased usage rate, making PV slightly shorter in duration-->
  24.             <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />
  25.             <Param type="PlayerTraitsReference">Promethean Vision</Param>
  26.           </E>
  27.           <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-->
  28.             <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
  29.             <Param type="EntityFilter" filterType="NoOne" />
  30.           </E>
  31.           <E type="Condition" name="EquipmentIsInUse" unionGroupID="-2"> <!--check if the AA is currently active-->
  32.             <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />
  33.           </E>
  34.           <E type="Action" name="ObjectSetNavpoint"> <!--create the navpoint and associate it with the current player-->
  35.             <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
  36.             <Param type="NameIndex">navpoint_flood_player</Param>
  37.           </E>
  38.           <E type="Action" name="ObjectSetNavpointVisibility"> <!--set navpoint to be visible to all - basically switch it on-->
  39.             <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
  40.             <Param type="EntityFilter" filterType="Any" />
  41.           </E>
  42.           <E type="Action" name="ObjectSetPriority"> <!--set the range at which the navpoint is visible-->
  43.             <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player" />
  44.             <Param type="NetworkPriority">High</Param>
  45.           </E>
  46.         </VT>
  47.       </Param>
  48.     </E>
  49.   </Elements>
  50. </Trigger>
Advertisement
Add Comment
Please, Sign In to add comment