Topic: Change in Story Mode

How can I create story mode with a map containing levels like in candy crush saga game??

Share

Thumbs up Thumbs down

Re: Change in Story Mode

Its not an easy answer, but it is possible using functionalities other than story mode.
I recommend using a more standard method like UFE.StartPlayerVersusCpu() and code your logic behind it. Story Mode is set in a way of auto-progress where a map system would allow you to replay previous matches at will.

Take a look at this page: http://www.ufe3d.com/doku.php/code


I also took the liberty and added a new overload to the method UFE._StartStoryModeBattle:
_StartStoryModeBattle(int groupNumber, float fadeTime = 0)

Even though StartPlayerVersusCpu() will do the job, using the method above will allow you to set which group number you want to start the story mode from. Might be useful if you want to use some of the Story Mode functionalities.

Expect this functionality to be available on the next update. If you have the Source version however you can just add this method to UFE.cs:

public static void _StartStoryModeBattle(int groupNumber, float fadeTime = 0){
   UFE.storyMode.currentGroup = groupNumber;
   _StartStoryModeBattle(fadeTime);
}
Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: Change in Story Mode

How can i start a match between two players of developer's choice using ufe.startplayervscpu() method?

Share

Thumbs up Thumbs down

Re: Change in Story Mode

Humm. If you want to skip the character selection all together, use this script:

public class StartCustomMatch : MonoBehaviour
{
    public UFE3D.CharacterInfo player1CharacterFile;
    public UFE3D.CharacterInfo player2CharacterFile;

    void Start()
    {
        UFE.config.player1Character = player1CharacterFile;
        UFE.config.player2Character = player2CharacterFile;
        UFE.SetCPU(1, false); // Set to true so player 1 is controlled by CPU
        UFE.SetCPU(2, true); // Set to false so player 2 is controlled by player

        UFE.StartLoadingBattleScreen();
        //UFE.StartGame(); // Use StartGame if you want to skip the loading screen
    }
}

Alternatively, you can load UFE in individual scenes and use the 'Start Game Immediately' toggle in combination with the Player 1/2 Character fields (that can also be changed programmatically)

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: Change in Story Mode

In story mode, how can i skip the character selection screen?(Like for the story only one character is selected by default. And the story goes through the perspective of that default character.)Thanks in advance.

Share

Thumbs up Thumbs down

Re: Change in Story Mode

How to auto-select a character?

Share

Thumbs up Thumbs down

Re: Change in Story Mode

kassassin99 wrote:

How to auto-select a character?

You can try combining the new _StartStoryModeBattle overload added on 2.11

public class StartCustomMatch : MonoBehaviour
{
    public UFE3D.CharacterInfo player1CharacterFile;

    void Start()
    {
        UFE.config.player1Character = player1CharacterFile;
        UFE._StartStoryModeBattle(0);
    }
}

I haven't tested this yet, but it should work.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: Change in Story Mode

While setting up Stage in Global window, there's a option for Loading Method by accessing the Scene File. Could you explain how that works? From where i should provide address to that scene? Because i have already done the post processing in the scene and making it prefab have undone all the post processing.

Share

Thumbs up Thumbs down

Re: Change in Story Mode

@kassassin99: It appears a solution was found in this thread:

http://www.ufe3d.com/forum/viewtopic.php?id=921&p=2

Share

Thumbs up Thumbs down

10 (edited by shubi 2019-02-22 06:00:15)

Re: Change in Story Mode

You don't need to change your code since the newest version of UFE. It's already built in and it works (I'm using scene-files instead of prefabs).

Simply add the scenes to your Build. In the global config-file you have to put the exact name of the scene-file into the "Scene Path" box. Do not add any path or something, only the name of the scene-file.
It works perfectly in vs- and training-mode. In story-mode there is still a bug:
http://www.ufe3d.com/forum/viewtopic.php?pid=7484#p7484

shubi's Website

Share

Thumbs up +1 Thumbs down