XCOM 2

XCOM 2

[WOTC] ADVENT Reinforcements (Includes ABA Support)
Toto téma bylo uzamčeno
Wilko  [vývojář] 29. říj. 2017 v 4.13
Custom animations, depending on Template
You can change the function inside 'X2Ability_CommanderReinforcements.uc' to have multiple animations, based on template.

simulated function Reinforce_BuildVisualization(XComGameState VisualizeGameState) { local XComGameStateHistory History; local XComGameStateContext_Ability Context; local XComGameState_Ability Ability; local StateObjectReference InteractingUnitRef; local XComGameState_Unit UnitState; local X2CharacterTemplate SourceTemplate; local VisualizationActionMetadata EmptyTrack; local VisualizationActionMetadata BuildTrack; local X2Action_PlayAnimation PlayAnimation; local X2Action_PlaySoundAndFlyOver SoundAndFlyover; History = `XCOMHISTORY; Context = XComGameStateContext_Ability(VisualizeGameState.GetContext()); InteractingUnitRef = Context.InputContext.SourceObject; UnitState = XComGameState_Unit(History.GetGameStateForObjectID(InteractingUnitRef.ObjectID)); SourceTemplate = UnitState.GetMyTemplateManager( ).FindCharacterTemplate( UnitState.GetMyTemplateName( ) ); BuildTrack = EmptyTrack; BuildTrack.StateObject_OldState = History.GetGameStateForObjectID(InteractingUnitRef.ObjectID, eReturnType_Reference, VisualizeGameState.HistoryIndex - 1); BuildTrack.StateObject_NewState = VisualizeGameState.GetGameStateForObjectID(InteractingUnitRef.ObjectID); BuildTrack.VisualizeActor = History.GetVisualizer(InteractingUnitRef.ObjectID); Ability = XComGameState_Ability(History.GetGameStateForObjectID(context.InputContext.AbilityRef.ObjectID, 1, VisualizeGameState.HistoryIndex - 1)); SoundAndFlyOver = X2Action_PlaySoundAndFlyOver(class'X2Action_PlaySoundAndFlyOver'.static.AddToVisualizationTree(BuildTrack, Context, false, BuildTrack.LastActionAdded)); SoundAndFlyover.SetSoundAndFlyOverParameters(none, Ability.GetMyTemplate().LocFlyOverText, 'None', eColor_Alien); PlayAnimation = X2Action_PlayAnimation(class'X2Action_PlayAnimation'.static.AddToVisualizationTree(BuildTrack, Context, false, BuildTrack.LastActionAdded)); switch (SourceTemplate.DataName) { case 'AdvCaptainM1': case 'AdvCaptainM2': case 'AdvCaptainM3': PlayAnimation.Params.AnimName = 'NO_CallReinforcementsA'; break; default: PlayAnimation.Params.AnimName = 'HL_CallReinforcementsA'; break; } PlayAnimation.bFinishAnimationWait = true; }
< >
Zobrazuje se 12 z 2 komentářů
Wilko  [vývojář] 29. říj. 2017 v 4.14 
The key section here is the 'switch' at the end, that sets the animation to play, based on the template name, with the default being used if no case is met.
Wilko  [vývojář] 11. pro. 2017 v 12.54 
This is now included in the mod (V3).
< >
Zobrazuje se 12 z 2 komentářů
Na stránku: 1530 50