1 (edited by xFTLxKingPhoenix 2021-01-28 16:57:57)

Topic: Animations Between Rounds UFE 2.3 Update [Tutorial] [Working]

heres a video showing off Cinematics Between rounds with normal win/lose, time out win/lose, and time out Draw.  this tutorial does not teach how to get the Timeout animations.

Necessary files to edit:  CharacterEditorWindow.cs,MoveSetData.cs ,StanceInfo.cs , FluxCapacitor.csFluxStateTracker.cs, FluxStates.cs, ControlsScript.cs, MoveSetScript.cs

open CharacterEditorWindow.cs:

look for Code:

            moveSet.cinematicIntro = (MoveInfo)EditorGUILayout.ObjectField("Cinematic Intro:", moveSet.cinematicIntro, typeof(MoveInfo), false);

add this directly under:

            //Cinematics Between Rounds
            moveSet.cinematicRoundWin = (MoveInfo)EditorGUILayout.ObjectField("Cinematic Round Win:", moveSet.cinematicRoundWin, typeof(MoveInfo), false);
            moveSet.cinematicRoundLose = (MoveInfo)EditorGUILayout.ObjectField("Cinematic Round Lose:", moveSet.cinematicRoundLose, typeof(MoveInfo), false);
            //Cinematics Between RoundsEND*/

save and open MoveSetData.cs:

look for :

[System.Serializable]
public class MoveSetData : ICloneable
{
    public CombatStances combatStance = CombatStances.Stance1; // This move set combat stance
    public MoveInfo cinematicIntro;

add directly under:

    //Cinematics Between Rounds
    public MoveInfo cinematicRoundWin;
    public MoveInfo cinematicRoundLose;
    //Cinematics Between RoundsEND*/

look for this :

    public StanceInfo ConvertData()
    {
        StanceInfo stanceData = new StanceInfo();
        stanceData.combatStance = this.combatStance;
        stanceData.cinematicIntro = this.cinematicIntro;

add this directly under:

        //Cinematics Between Rounds
        stanceData.cinematicRoundWin = this.cinematicRoundWin;
        stanceData.cinematicRoundLose = this.cinematicRoundLose;
        //Cinematics Between RoundsEND*/

save and open StanceInfo.cs:

first look for :

namespace UFE3D
{
    [System.Serializable]
    public class StanceInfo : ScriptableObject
    {
        public CombatStances combatStance = CombatStances.Stance1;
        public MoveInfo cinematicIntro;

add this directly under:

        //Cinematics Between Rounds
        public MoveInfo cinematicRoundWin;
        public MoveInfo cinematicRoundLose;
        //Cinematics Between RoundsEND*/

next look for this set of code:

        public MoveSetData ConvertData()
        {
            MoveSetData moveSet = new MoveSetData();
            moveSet.combatStance = this.combatStance;
            moveSet.cinematicIntro = this.cinematicIntro;

add this directly under :

            //Cinematics Between Rounds
            moveSet.cinematicRoundWin = this.cinematicRoundWin;
            moveSet.cinematicRoundLose = this.cinematicRoundLose;
            //Cinematics Between RoundsEND*/

save and open the FluxCapacitor.cs:

firstly look for this:

        // Start New Round or End Game
        if (winner.roundsWon > Mathf.Ceil(UFE.config.roundOptions.totalRounds / 2) || winner.challengeMode != null) {
            winner.SetMoveToOutro();
            UFE.DelaySynchronizedAction(this.KillCam, UFE.config.roundOptions._endGameDelay);
            UFE.FireGameEnds(winner, winner.opControlsScript);
        } else {
            UFE.DelaySynchronizedAction(this.NewRound, UFE.config.roundOptions._newRoundDelay);
        }

replace the last line "UFE.DelaySynchronizedAction(this.NewRound, UFE.config.roundOptions._newRoundDelay);"

with this:

            //Cinematics Between Rounds
            winner.SetMoveToRoundWin();
            winner.opControlsScript.SetMoveToRoundLose();
            //Cinematics Between RoundsEND
            UFE.DelaySynchronizedAction(this.NewRound, UFE.config.roundOptions._newRoundDelay);

save this and open FluxStateTracker.cs


look for this:

                controlsScript.ignoreCollisionMass = state.ignoreCollisionMass;
                controlsScript.introPlayed = state.introPlayed;

add this under :


                //Cinematics Between Rounds
                controlsScript.roundWinPlayed = state.roundWinPlayed;
                controlsScript.roundLosePlayed = state.roundLosePlayed;
                //Cinematics Between RoundsEND

look for this

            state.ignoreCollisionMass = controlsScript.ignoreCollisionMass;
            state.introPlayed = controlsScript.introPlayed;

addthis under:

            //Cinematics Between Rounds
            state.roundWinPlayed = controlsScript.roundWinPlayed;
            state.roundLosePlayed = controlsScript.roundLosePlayed;
            //Cinematics Between RoundsEND

save this and move on to FluxStates.cs

look this line of code:

        public bool ignoreCollisionMass;
        public bool introPlayed;

add this right under:

        //Cinematics Between Rounds
        public bool roundWinPlayed;
        public bool roundLosePlayed;
        //Cinematics Between RoundsEND

save this and move on to ControlsScript.cs

look for this

    public bool ignoreCollisionMass;
    public bool introPlayed;

add this right under:

    //Cinematics Between Rounds
    public bool roundWinPlayed;
    public bool roundLosePlayed;
    //Cinematics Between RoundsEND


look for this

        // Kill Move
        if (move.currentFrame >= move.totalFrames) {
            if (move.name == "Intro") {
                introPlayed = true;
                if (opControlsScript.introPlayed) UFE.CastNewRound(2);
            }
            if (move.armorOptions.hitsTaken > 0) comboHits = 0;
            KillCurrentMove();

add this under it

            //Cinematics Between Rounds
            if (move.name == "Cinematic Round Win") {
                roundWinPlayed = true;
                if (opControlsScript.roundLosePlayed) UFE.CastNewRound(2);
            }
            //Cinematics Between RoundsEND

look for this

    public void SetMoveToOutro(){
        KillCurrentMove();
        this.SetMove(myMoveSetScript.GetOutro());

        outroPlayed = true;
    }

add this under :

    //Cinematics Between Rounds
    public void SetMoveToRoundWin(){
        KillCurrentMove();
        this.SetMove(myMoveSetScript.GetRoundWin());

        roundWinPlayed = true;
    }
    public void SetMoveToRoundLose(){
        KillCurrentMove();
        this.SetMove(myMoveSetScript.GetRoundLose());

        roundLosePlayed = true;
    }
    //Cinematics Between RoundsEND

save and move on to the Last File.  MoveSetScript.cs


look for this :

    protected void SetWinner(ControlsScript winner) {
        ++winner.roundsWon;
        UFE.FireRoundEnds(winner, winner.opControlsScript);
        // Start New Round or End Game
        if (winner.roundsWon > Mathf.Ceil(UFE.config.roundOptions.totalRounds / 2) || winner.challengeMode != null) {
            winner.SetMoveToOutro();
            UFE.DelaySynchronizedAction(this.KillCam, UFE.config.roundOptions._endGameDelay);
            UFE.FireGameEnds(winner, winner.opControlsScript);
        } else {

add this inside the else above the UFE line thats present:


            //Cinematics Between Rounds
            winner.SetMoveToRoundWin();
            winner.opControlsScript.SetMoveToRoundLose();
            //Cinematics Between RoundsEND

look for this:

                if (moveSetData.cinematicIntro != null) {
                    intro = Instantiate(moveSetData.cinematicIntro) as MoveInfo;
                    intro.name = "Intro";
                    attachAnimation(intro.animMap.clip, intro.name, intro._animationSpeed, intro.wrapMode, intro.animMap.length);
                }

add this under that:

                //Cinematics Between Rounds
                if (moveSetData.cinematicRoundWin != null) {
                    roundWin = Instantiate(moveSetData.cinematicRoundWin) as MoveInfo;
                    roundWin.name = "Round Win";
                    attachAnimation(roundWin.animMap.clip, roundWin.name, roundWin._animationSpeed, roundWin.wrapMode, roundWin.animMap.length);
                }
                if (moveSetData.cinematicRoundLose != null) {
                    roundLose = Instantiate(moveSetData.cinematicRoundLose) as MoveInfo;
                    roundLose.name = "Round Lose";
                    attachAnimation(roundLose.animMap.clip, roundLose.name, roundLose._animationSpeed, roundLose.wrapMode, roundLose.animMap.length);
                }
                //Cinematics Between RoundsEND

lastly search for this:

    public MoveInfo GetIntro()
    {
        return InstantiateMove(intro);
    }
    
    public MoveInfo GetOutro()
    {
        return InstantiateMove(outro);
    }

add this directly under:

    //Cinematics Between Rounds
    public MoveInfo GetRoundWin()
    {
        return InstantiateMove(roundWin);
    }
    
    public MoveInfo GetRoundLose()
    {
        return InstantiateMove(roundLose);
    }
    //Cinematics Between RoundsEND

save and youre Done

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up +1 Thumbs down

Re: Animations Between Rounds UFE 2.3 Update [Tutorial] [Working]

xFTLxKingPhoenix wrote:

heres a video showing off Cinematics Between rounds with normal win/lose, time out win/lose, and time out Draw.  this tutorial does not teach how to get the Timeout animations.

Necessary files to edit:  CharacterEditorWindow.cs,MoveSetData.cs ,StanceInfo.cs , FluxCapacitor.csFluxStateTracker.cs, FluxStates.cs, ControlsScript.cs, MoveSetScript.cs

open CharacterEditorWindow.cs:

look for Code:

            moveSet.cinematicIntro = (MoveInfo)EditorGUILayout.ObjectField("Cinematic Intro:", moveSet.cinematicIntro, typeof(MoveInfo), false);

add this directly under:

            //Cinematics Between Rounds
            moveSet.cinematicRoundWin = (MoveInfo)EditorGUILayout.ObjectField("Cinematic Round Win:", moveSet.cinematicRoundWin, typeof(MoveInfo), false);
            moveSet.cinematicRoundLose = (MoveInfo)EditorGUILayout.ObjectField("Cinematic Round Lose:", moveSet.cinematicRoundLose, typeof(MoveInfo), false);
            //Cinematics Between RoundsEND*/

save and open MoveSetData.cs:

look for :

[System.Serializable]
public class MoveSetData : ICloneable
{
    public CombatStances combatStance = CombatStances.Stance1; // This move set combat stance
    public MoveInfo cinematicIntro;

add directly under:

    //Cinematics Between Rounds
    public MoveInfo cinematicRoundWin;
    public MoveInfo cinematicRoundLose;
    //Cinematics Between RoundsEND*/

look for this :

    public StanceInfo ConvertData()
    {
        StanceInfo stanceData = new StanceInfo();
        stanceData.combatStance = this.combatStance;
        stanceData.cinematicIntro = this.cinematicIntro;

add this directly under:

        //Cinematics Between Rounds
        stanceData.cinematicRoundWin = this.cinematicRoundWin;
        stanceData.cinematicRoundLose = this.cinematicRoundLose;
        //Cinematics Between RoundsEND*/

save and open StanceInfo.cs:

first look for :

namespace UFE3D
{
    [System.Serializable]
    public class StanceInfo : ScriptableObject
    {
        public CombatStances combatStance = CombatStances.Stance1;
        public MoveInfo cinematicIntro;

add this directly under:

        //Cinematics Between Rounds
        public MoveInfo cinematicRoundWin;
        public MoveInfo cinematicRoundLose;
        //Cinematics Between RoundsEND*/

next look for this set of code:

        public MoveSetData ConvertData()
        {
            MoveSetData moveSet = new MoveSetData();
            moveSet.combatStance = this.combatStance;
            moveSet.cinematicIntro = this.cinematicIntro;

add this directly under :

            //Cinematics Between Rounds
            moveSet.cinematicRoundWin = this.cinematicRoundWin;
            moveSet.cinematicRoundLose = this.cinematicRoundLose;
            //Cinematics Between RoundsEND*/

save and open the FluxCapacitor.cs:

firstly look for this:

        // Start New Round or End Game
        if (winner.roundsWon > Mathf.Ceil(UFE.config.roundOptions.totalRounds / 2) || winner.challengeMode != null) {
            winner.SetMoveToOutro();
            UFE.DelaySynchronizedAction(this.KillCam, UFE.config.roundOptions._endGameDelay);
            UFE.FireGameEnds(winner, winner.opControlsScript);
        } else {
            UFE.DelaySynchronizedAction(this.NewRound, UFE.config.roundOptions._newRoundDelay);
        }

replace the last line "UFE.DelaySynchronizedAction(this.NewRound, UFE.config.roundOptions._newRoundDelay);"

with this:

            //Cinematics Between Rounds
            winner.SetMoveToRoundWin();
            winner.opControlsScript.SetMoveToRoundLose();
            //Cinematics Between RoundsEND
            UFE.DelaySynchronizedAction(this.NewRound, UFE.config.roundOptions._newRoundDelay);

save this and open FluxStateTracker.cs


look for this:

                controlsScript.ignoreCollisionMass = state.ignoreCollisionMass;
                controlsScript.introPlayed = state.introPlayed;

add this under :


                //Cinematics Between Rounds
                controlsScript.roundWinPlayed = state.roundWinPlayed;
                controlsScript.roundLosePlayed = state.roundLosePlayed;
                //Cinematics Between RoundsEND

look for this

            state.ignoreCollisionMass = controlsScript.ignoreCollisionMass;
            state.introPlayed = controlsScript.introPlayed;

addthis under:

            //Cinematics Between Rounds
            state.roundWinPlayed = controlsScript.roundWinPlayed;
            state.roundLosePlayed = controlsScript.roundLosePlayed;
            //Cinematics Between RoundsEND

save this and move on to FluxStates.cs

look this line of code:

        public bool ignoreCollisionMass;
        public bool introPlayed;

add this right under:

        //Cinematics Between Rounds
        public bool roundWinPlayed;
        public bool roundLosePlayed;
        //Cinematics Between RoundsEND

save this and move on to ControlsScript.cs

look for this

    public bool ignoreCollisionMass;
    public bool introPlayed;

add this right under:

    //Cinematics Between Rounds
    public bool roundWinPlayed;
    public bool roundLosePlayed;
    //Cinematics Between RoundsEND


look for this

        // Kill Move
        if (move.currentFrame >= move.totalFrames) {
            if (move.name == "Intro") {
                introPlayed = true;
                if (opControlsScript.introPlayed) UFE.CastNewRound(2);
            }
            if (move.armorOptions.hitsTaken > 0) comboHits = 0;
            KillCurrentMove();

add this under it

            //Cinematics Between Rounds
            if (move.name == "Cinematic Round Win") {
                roundWinPlayed = true;
                if (opControlsScript.roundLosePlayed) UFE.CastNewRound(2);
            }
            //Cinematics Between RoundsEND

look for this

    public void SetMoveToOutro(){
        KillCurrentMove();
        this.SetMove(myMoveSetScript.GetOutro());

        outroPlayed = true;
    }

add this under :

    //Cinematics Between Rounds
    public void SetMoveToRoundWin(){
        KillCurrentMove();
        this.SetMove(myMoveSetScript.GetRoundWin());

        roundWinPlayed = true;
    }
    public void SetMoveToRoundLose(){
        KillCurrentMove();
        this.SetMove(myMoveSetScript.GetRoundLose());

        roundLosePlayed = true;
    }
    //Cinematics Between RoundsEND

save and move on to the Last File.  MoveSetScript.cs


look for this :

    protected void SetWinner(ControlsScript winner) {
        ++winner.roundsWon;
        UFE.FireRoundEnds(winner, winner.opControlsScript);
        // Start New Round or End Game
        if (winner.roundsWon > Mathf.Ceil(UFE.config.roundOptions.totalRounds / 2) || winner.challengeMode != null) {
            winner.SetMoveToOutro();
            UFE.DelaySynchronizedAction(this.KillCam, UFE.config.roundOptions._endGameDelay);
            UFE.FireGameEnds(winner, winner.opControlsScript);
        } else {

add this inside the else above the UFE line thats present:


            //Cinematics Between Rounds
            winner.SetMoveToRoundWin();
            winner.opControlsScript.SetMoveToRoundLose();
            //Cinematics Between RoundsEND

look for this:

                if (moveSetData.cinematicIntro != null) {
                    intro = Instantiate(moveSetData.cinematicIntro) as MoveInfo;
                    intro.name = "Intro";
                    attachAnimation(intro.animMap.clip, intro.name, intro._animationSpeed, intro.wrapMode, intro.animMap.length);
                }

add this under that:

                //Cinematics Between Rounds
                if (moveSetData.cinematicRoundWin != null) {
                    roundWin = Instantiate(moveSetData.cinematicRoundWin) as MoveInfo;
                    roundWin.name = "Round Win";
                    attachAnimation(roundWin.animMap.clip, roundWin.name, roundWin._animationSpeed, roundWin.wrapMode, roundWin.animMap.length);
                }
                if (moveSetData.cinematicRoundLose != null) {
                    roundLose = Instantiate(moveSetData.cinematicRoundLose) as MoveInfo;
                    roundLose.name = "Round Lose";
                    attachAnimation(roundLose.animMap.clip, roundLose.name, roundLose._animationSpeed, roundLose.wrapMode, roundLose.animMap.length);
                }
                //Cinematics Between RoundsEND

lastly search for this:

    public MoveInfo GetIntro()
    {
        return InstantiateMove(intro);
    }
    
    public MoveInfo GetOutro()
    {
        return InstantiateMove(outro);
    }

add this directly under:

    //Cinematics Between Rounds
    public MoveInfo GetRoundWin()
    {
        return InstantiateMove(roundWin);
    }
    
    public MoveInfo GetRoundLose()
    {
        return InstantiateMove(roundLose);
    }
    //Cinematics Between RoundsEND

save and youre Done

pretty cool. I would like to do this for my game as well

Share

Thumbs up Thumbs down

Re: Animations Between Rounds UFE 2.3 Update [Tutorial] [Working]

sol-survivor wrote:

pretty cool. I would like to do this for my game as well


you need source but its fun to have

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

4 (edited by apollo 2021-07-18 23:07:11)

Re: Animations Between Rounds UFE 2.3 Update [Tutorial] [Working]

The instructions didn't work.

It didn't break my game either so I'm leaving them in.

Share

Thumbs up Thumbs down

5 (edited by nusaw316 2022-04-14 21:21:07)

Re: Animations Between Rounds UFE 2.3 Update [Tutorial] [Working]

I got stuck. MoveSetScript.cs doesn't have the information posted on the final step.

i.e.:

protected void SetWinner(ControlsScript winner) {
        ++winner.roundsWon;
        UFE.FireRoundEnds(winner, winner.opControlsScript);
        // Start New Round or End Game
        if (winner.roundsWon > Mathf.Ceil(UFE.config.roundOptions.totalRounds / 2) || winner.challengeMode != null) {
            winner.SetMoveToOutro();
            UFE.DelaySynchronizedAction(this.KillCam, UFE.config.roundOptions._endGameDelay);
            UFE.FireGameEnds(winner, winner.opControlsScript);
        } else {


It was a good try

Share

Thumbs up Thumbs down