XCOM 2
[WOTC] ADVENT Reinforcements (Includes ABA Support)
Tämä keskustelu on lukittu
Wilko  [kehittäjä] 29.10.2017 klo 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; }
< >
Näytetään 1-2 / 2 kommentista
Wilko  [kehittäjä] 29.10.2017 klo 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  [kehittäjä] 11.12.2017 klo 12.54 
This is now included in the mod (V3).
< >
Näytetään 1-2 / 2 kommentista
Sivua kohden: 1530 50