Topic: Win/Lose Animation In Between Rounds

to Perform this is actually extremely easy

you'll need to edit CharacterInfo.cs , ControlsScript.cs , MoveSetScript.cs and the CharacterEditorWindow.cs



so open up the CharacterInfo.cs

look for the following code:

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

right under this add

    public MoveInfo cinematicRoundWin;
    public MoveInfo cinematicRoundLost;

Save Thats done



in the ControlsScript.cs

look for :

    public int comboHits { get; protected set; }
    public float comboDamage { get; protected set; }
    public float comboHitDamage { get; protected set; }
    public MoveSetScript MoveSet { get { return this.myMoveSetScript; } }
    public PhysicsScript Physics { get { return this.myPhysicsScript; } }
    public string aiDebugger { get; set; }
    public bool introPlayed { get; protected set; }

add

    public bool roundWinPlayed { get; protected set; }
    public bool roundLostPlayed { get; protected set; }

Search for

        // Start New Round or End Game
        if (opControlsScript.roundsWon > Mathf.Ceil(UFE.config.roundOptions.totalRounds / 2))
        {
            opControlsScript.SetMoveToOutro();
            UFE.DelaySynchronizedAction(this.EndGame, UFE.config.roundOptions.endGameDelay);
        }
        else
        {

then inside the else Statement right above "UFE.DelaySynchronizedAction" line Add:

            if (isDead && currentMove == null && myPhysicsScript.IsGrounded())
            {
                opControlsScript.SetMoveToRoundWin();
                SetMoveToRoundLost();
            }
 

Last part of This file Search for

    public void SetMoveToOutro()
    {
        this.SetMove(myMoveSetScript.GetOutro());
        if (currentMove != null)
        {
            currentMove.currentFrame = 0;
            currentMove.currentTick = 0;
        }
        outroPlayed = true;
    }

then right above it add

    public void SetMoveToRoundWin()
    {
        this.SetMove(myMoveSetScript.GetRoundWin());
        if (currentMove != null)
        {
            currentMove.currentFrame = 0;
            currentMove.currentTick = 0;
        }
        roundWinPlayed = true;
    }

    public void SetMoveToRoundLost()
    {
        this.SetMove(myMoveSetScript.GetRoundLost());
        if (currentMove != null)
        {
            currentMove.currentFrame = 0;
            currentMove.currentTick = 0;
        }
        roundLostPlayed = true;
    }
 

save and continue

open the MoveSetScript.cs

search for

    
    public MoveInfo intro;
    public MoveInfo outro;
 

just under add

    public MoveInfo roundWin;
    public MoveInfo roundLose;

Search

                if (moveSetData.cinematicIntro != null)
                {
                    intro = Instantiate(moveSetData.cinematicIntro) as MoveInfo;
                    intro.name = "Intro";
                    attachAnimation(intro.animationClip, intro.name, intro.animationSpeed, intro.wrapMode);
                }
 

add under this

                if (moveSetData.cinematicRoundWin != null)
                {
                    roundWin = Instantiate(moveSetData.cinematicRoundWin) as MoveInfo;
                    roundWin.name = "Round Win";
                    attachAnimation(roundWin.animationClip, roundWin.name, roundWin.animationSpeed, roundWin.wrapMode);
                }

                if (moveSetData.cinematicRoundLost != null)
                {
                    roundLose = Instantiate(moveSetData.cinematicRoundLost) as MoveInfo;
                    roundLose.name = "Round Lose";
                    attachAnimation(roundLose.animationClip, roundLose.name, roundLose.animationSpeed, roundLose.wrapMode);
                }

Search

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

add just under

    public MoveInfo GetRoundWin()
    {
        return InstantiateMove(roundWin);
    }
    public MoveInfo GetRoundLost()
    {
        return InstantiateMove(roundLose);
    }
 

save and open up CharacterEditorWindow.cs


search
   

                            characterInfo.moves[i].cinematicIntro = (MoveInfo)EditorGUILayout.ObjectField("Cinematic Intro:", characterInfo.moves[i].cinematicIntro, typeof(MoveInfo), false);

add  just under

                                characterInfo.moves[i].cinematicRoundWin = (MoveInfo)EditorGUILayout.ObjectField("Cinematic RoundWin:", characterInfo.moves[i].cinematicRoundWin, typeof(MoveInfo), false);
                                characterInfo.moves[i].cinematicRoundLost = (MoveInfo)EditorGUILayout.ObjectField("Cinematic RoundLost:", characterInfo.moves[i].cinematicRoundLost, typeof(MoveInfo), false);
 
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 +2 Thumbs down

Re: Win/Lose Animation In Between Rounds

Amazing!! gonna test it later today when back from work!

Thanks!

Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.

Re: Win/Lose Animation In Between Rounds

No problem

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: Win/Lose Animation In Between Rounds

Works perfectly!

Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.

Re: Win/Lose Animation In Between Rounds

Thanks for letting me know I didnt leave anything out.

I usually do.

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

Re: Win/Lose Animation In Between Rounds

@xFTLxKingPhoenix The sourcecode in UFE2 is totally different. None of this is applicable for UFE2 Source.

How can apply it to the UFE2?

Share

Thumbs up Thumbs down

Re: Win/Lose Animation In Between Rounds

havent Implemented in UFE2 yet. but when i figure it out ill make a new tutorial so look out for that

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