Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. simulated function ReadyForAnything_BuildVisualization(XComGameState VisualizeGameState)
  2. {
  3.     local XComGameStateHistory History;
  4.     local XComGameStateContext_Ability Context;
  5.     local StateObjectReference InteractingUnitRef;
  6.     local X2Action_PlaySoundAndFlyOver      SoundAndFlyOver;
  7.     local VisualizationActionMetadata EmptyTrack;
  8.     local VisualizationActionMetadata ActionMetadata;
  9.     local X2AbilityTemplate AbilityTemplate;
  10.     local string FlyOverText;
  11.  
  12.     History = `XCOMHISTORY;
  13.  
  14.     Context = XComGameStateContext_Ability(VisualizeGameState.GetContext());
  15.     InteractingUnitRef = Context.InputContext.SourceObject;
  16.    
  17.  
  18.     //Configure the visualization track for the shooter
  19.     //****************************************************************************************
  20.     ActionMetadata = EmptyTrack;
  21.     ActionMetadata.StateObject_OldState = History.GetGameStateForObjectID(InteractingUnitRef.ObjectID, eReturnType_Reference, VisualizeGameState.HistoryIndex - 1);
  22.     ActionMetadata.StateObject_NewState = VisualizeGameState.GetGameStateForObjectID(InteractingUnitRef.ObjectID);
  23.     ActionMetadata.VisualizeActor = History.GetVisualizer(InteractingUnitRef.ObjectID);
  24.  
  25.     AbilityTemplate = class'X2AbilityTemplateManager'.static.GetAbilityTemplateManager().FindAbilityTemplate('ReadyForAnything');
  26.     FlyOverText = AbilityTemplate.LocFlyOverText;
  27.  
  28.     SoundAndFlyOver = X2Action_PlaySoundAndFlyOver(class'X2Action_PlaySoundAndFlyOver'.static.AddToVisualizationTree(ActionMetadata, Context, false, ActionMetadata.LastActionAdded));
  29.     SoundAndFlyOver.SetSoundAndFlyOverParameters(SoundCue'SoundUI.OverWatchCue', FlyOverText, '', eColor_Alien, "img:///UILibrary_PerkIcons.UIPerk_overwatch");
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement