XCOM 2
[WOTC] ADVENT Reinforcements (Includes ABA Support)
此主題已被鎖定
Wilko  [開發人員] 2017 年 10 月 29 日 上午 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; }
< >
目前顯示第 1-2 則留言,共 2
Wilko  [開發人員] 2017 年 10 月 29 日 上午 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  [開發人員] 2017 年 12 月 11 日 下午 12:54 
This is now included in the mod (V3).
< >
目前顯示第 1-2 則留言,共 2
每頁顯示: 1530 50