1

(12 replies, posted in UFE 1 Source (Deprecated))

This works for me until I get to the last step.  I get errors saying that p1InputController and p2InputController do not exist in the current context.

2

(3 replies, posted in UFE 1 (Deprecated))

Not for while, UFE 1.7 just came out a few weeks ago.

3

(116 replies, posted in UFE 1 (Deprecated))

I get a FMOD error when the game starts and the game will not run.  May be because I added my own title screen option, but not too sure.  That's why I am here asking if anyone else is having the same problem.  I am on 5.3.2.  Also, what is new in 1.7.1? I do not want to have to replace my menu scripts again, that was a pain.

I'm glad I'm not the only one experiencing a problem with the character select screen. My problem is the controls are inverted. Up and Down are Left and Right and vice versa.

StriderSpinel wrote:
TheAtomicFist wrote:
StriderSpinel wrote:

the title screen appears, but no button takes me to the main menu, if i press ok or cancel the sounds play, but the screen won't change.

Easy fix, you just have to go into the TitleScreen Prefab, make a button and you should be able to assign the TitleScreen Object to the button script and set it to GoToMainMenu.

i put the button, but now it's in a loop... i told it to go to Mainmenu, but it returns to the title screen over and over again

That's odd. Not quite sure what the problem is to be honest.  ONly thing I can think of is that the Main Menu is set as the title screen as well now. Other than that, go through GlobalEditor, UFE, the TitleScreen scripts/Main Menu scripts and IntroScreen scripts to make sure the terms are all the same. If you have skype or another instant messaging system, I can help you through there.  Communication will be faster.

StriderSpinel wrote:

the title screen appears, but no button takes me to the main menu, if i press ok or cancel the sounds play, but the screen won't change.

Easy fix, you just have to go into the TitleScreen Prefab, make a button and you should be able to assign the TitleScreen Object to the button script and set it to GoToMainMenu.

StriderSpinel wrote:

ok... i did that and it told me it dind't have a StartTitleScreen in UFE.cs

so i searched and found this:

public static void StartMainMenuScreen(){
        UFE.StartMainMenuScreen(UFE.config.gameGUI.defaultFadeDuration);
    }

    public static void StartMainMenuScreen(float fadeTime){
        CameraFade.StartAlphaFade(Color.black, false, fadeTime/2f, 0, () => { UFE._StartTitleScreen(fadeTime/2f); });
    }

and added this:

public static void StartTitleScreen(){
        UFE.StartTitleScreen(UFE.config.gameGUI.defaultFadeDuration);
    }
    
    public static void StartTitleScreen(float fadeTime){
        CameraFade.StartAlphaFade(Color.black, false, fadeTime/2f, 0, () => { UFE._StartTitleScreen(fadeTime/2f); });
    }

now the title screen appears! but i ca't get out of it!

it's almost there i think!

What do you mean when you say you can't get out of it?

StriderSpinel wrote:

the text turns red and gives me this error:

Assets/UFE/Scripts/UI/Base/IntroScreen.cs(6,21): error CS0117: `UFE' does not contain a definition for `StartTitleScreen'

I have had this problem before.  There is another part I left out.   

Search for this:

private static void _StartMainMenuScreen(float fadeTime){
        if (UFE.isConnected && !UFE.disconnecting) Network.Disconnect();
        CameraFade.StartAlphaFade(Color.black, true, fadeTime);

        UFE.EndGame();
        UFE.HideScreen(UFE.currentScreen);
        if (UFE.config.gameGUI.mainMenuScreen == null){
            Debug.LogError("Main Menu Screen not found! Make sure you have set the prefab correctly in the Global Editor");
        }else{
            UFE.ShowScreen(UFE.config.gameGUI.mainMenuScreen);
        }
    }

Then add this below it:

private static void _StartTitleScreen(float fadeTime){
        if (UFE.isConnected && !UFE.disconnecting) Network.Disconnect();
        CameraFade.StartAlphaFade(Color.black, true, fadeTime);
        
        UFE.EndGame();
        UFE.HideScreen(UFE.currentScreen);
        if (UFE.config.gameGUI.titleScreen == null){
            Debug.LogError("Title Screen not found! Make sure you have set the prefab correctly in the Global Editor");
        }else{
            UFE.ShowScreen(UFE.config.gameGUI.titleScreen);
        }
    }
StriderSpinel wrote:
TheAtomicFist wrote:
StriderSpinel wrote:

well, i've done it all but the title screen doesn't pop up, and i'm not sure what is wrong. we don't need to change anything in UFE.cs?

thanks in advance

I knew I left something out.  Search for this in UFE.cs:

#region public class methods: GUI Related methods
    public static BattleGUI GetBattleGUI(){
        return UFE.config.gameGUI.battleGUI;
    }

Then add this line of code to match with the others:

public static TitleScreen GetTitleScreen(){
        return UFE.config.gameGUI.titleScreen;
    }

See if that works.


it stil doesn't work, in introscreen.cs  i have

using UnityEngine;
using System.Collections;

public class IntroScreen : UFEScreen {
    public virtual void GoToTitleScreen(){
        UFE.StartMainMenuScreen(0f);
    }
}

i don't know if that area "start main menu screen" have something to do with it, i'm really bad at coding

Thanks!

Change StartMainMenuScreen to StartTitleScreen.

StriderSpinel wrote:

well, i've done it all but the title screen doesn't pop up, and i'm not sure what is wrong. we don't need to change anything in UFE.cs?

thanks in advance

I knew I left something out.  Search for this in UFE.cs:

#region public class methods: GUI Related methods
    public static BattleGUI GetBattleGUI(){
        return UFE.config.gameGUI.battleGUI;
    }

Then add this line of code to match with the others:

public static TitleScreen GetTitleScreen(){
        return UFE.config.gameGUI.titleScreen;
    }

See if that works.

Here is a quick guide on how I made my title screen, aka MainMenuScreen 2. MAKE A BACKUP JUST IN CASE!

Step 1: Making the Title Screen option appear in Global Editor.

Open GlobalEditorWindow.cs and search for SubGroupTitle("Main");.  This is where the GUI for each scene is listed. 

Use this and insert where ever you would like.  I pasted this on top of my main menu section.

EditorGUILayout.BeginHorizontal();{
                                    globalInfo.gameGUI.titleScreen = (TitleScreen)EditorGUILayout.ObjectField("Title:", globalInfo.gameGUI.titleScreen, typeof(TitleScreen), true);
                                    EditorGUI.BeginDisabledGroup(DisableScreenButton(globalInfo.gameGUI.titleScreen));{
                                        // if (GUILayout.Button("Open", GUILayout.Width(45))) OpenGUICanvas(globalInfo.gameGUI.mainMenuScreen);
                                        ScreenButton(globalInfo.gameGUI.titleScreen);
                                    } EditorGUI.EndDisabledGroup();
                                } EditorGUILayout.EndHorizontal();

Close the code and see if a new option is available for Title Screen. If not, check your indentions, spacing, etc. After previewing this post, it looks like the code is spaced incorrectly.  In order to get a title screen option, all you have to do is copy main menu or another, and replace everything with title screen.

Now open GlobalInfo.cs and look for this code:

    public IntroScreen introScreen;
    public MainMenuScreen mainMenuScreen;
    public OptionsScreen optionsScreen;
    public CreditsScreen creditsScreen;
    public PauseScreen pauseScreen;

Place public TitleScreen titleScreen; anywhere. I placed my beneath the pause screen.

Step 2: Creating the Title Screen Script.

Create a new script in SCRIPTS/UI/BASE folder in your project and call it TitleScreen. Then paste this code into the script.

using UnityEngine;
using System.Collections;

public class TitleScreen : UFEScreen {
    public virtual void Quit(){
        UFE.Quit();
    }

    public virtual void GoToStoryModeScreen(){
        UFE.StartStoryMode();
    }

    public virtual void GoToVersusModeScreen(){
        UFE.StartVersusModeScreen();
    }

    public virtual void GoToTrainingModeScreen(){
        UFE.StartTrainingMode();
    }

    public virtual void GoToNetworkPlayScreen(){
        UFE.StartNetworkGameScreen();
    }

    public virtual void GoToOptionsScreen(){
        UFE.StartOptionsScreen();
    }

    public virtual void GoToMainMenuScreen(){
        UFE.StartMainMenuScreen();
    
    }

    public virtual void GoToCreditsScreen(){
        UFE.StartCreditsScreen();
    }
}

This is the Main Menu script, but with a StartMainMenuScreen function added.

Step 3: Create the DefaultTitleScreen script.

Create a script in SCRIPTS/UI/BASE and call it DefaultTitleScreen. Paste this code inside.

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;

public class DefaultTitleScreen : TitleScreen{
    #region public instance fields
    public AudioClip onLoadSound;
    public AudioClip music;
    public AudioClip selectSound;
    public AudioClip cancelSound;
    public AudioClip moveCursorSound;
    public bool stopPreviousSoundEffectsOnLoad = false;
    public float delayBeforePlayingMusic = 0.1f;

    public Button buttonNetwork;
    #endregion

    #region public override methods
    public override void DoFixedUpdate(){
        base.DoFixedUpdate();
        this.DefaultNavigationSystem(this.selectSound, this.moveCursorSound, null, this.cancelSound);
    }

    public override void OnShow (){
        base.OnShow ();
        this.HighlightOption(this.FindFirstSelectable());

        if (this.music != null){
            UFE.DelayLocalAction(delegate(){UFE.PlayMusic(this.music);}, this.delayBeforePlayingMusic);
        }
        
        if (this.stopPreviousSoundEffectsOnLoad){
            UFE.StopSounds();
        }
        
        if (this.onLoadSound != null){
            UFE.DelayLocalAction(delegate(){UFE.PlaySound(this.onLoadSound);}, this.delayBeforePlayingMusic);
        }
    }
    #endregion
}

Step 4: Change VideoIntro to go to TitleScreen instead of Main Menu.

Open your IntroSceen.cs script and change GoToMainMenu to GoToTitleScreen. You must also change this in the VideoIntro.cs and TextureIntro.cs scripts.

Step 5: Create Title Screen Prefab.

Copy and Paste Main Menu prefab, then switch out the DefaultMainMenu script with the DefaultTitleScript and setup buttons. Once done, drag the prefab to the Title Screen section.

Hopefully I covered everything that needed to be changed.  If not, this is very simple and should be understanding when looking in the right places.  If anyone needs help, I will be available. I get emails from this post.  So feel free to ask!

shubi wrote:

Please let us know how you did that smile

I have started writing a guide and will post here tomorrow.  Need to make sure I do not skip anything.  There is a lot of copying and pasting and searching.

13

(116 replies, posted in UFE 1 (Deprecated))

StriderSpinel wrote:

i have the UFE BUNDLE, with fuzzy AI and everything, that means i'll get the network add on?

I'm pretty sure you will receive it for free.

I made a title screen visible, seeing if it works now.

Edit: Title Screen works! If anyone is interesting in learning what I did, let me know.  I would be happy to help.

Hi! I have been trying to make a title screen that shows after the intro video, but before the main menu.  I have tried modifying the main menu screen prefab and textureintroscreen prefab, but cannot get anything to work properly.  If someone could help point out what to add in globalinfo.cs and explain how to neatly setup a script for the titlescreen that would help a lot! Thank you!

16

(8 replies, posted in UFE 1 (Deprecated))

For the new online functions, will we need any assets that are not included with UFE? I ask this because Photon PUN+ and Bolt are on sale, or will we be able to use free versions?