Topic: Move list Screen

I'm looking to alter my move list screen .

What I'm looking to accomplish is one of the following:

(Prefered)
When selecting movelist from pause menu what ever player selected it . The character that player is using's move list shows up automatically.


(Acceptable)
When selecting Movelist the whole list of currently playable characters pops up( ignoring all locked characters) and the player can choose which Movelist to view

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: Move list Screen

Did you figure this out?

Re: Move list Screen

nope

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: Move list Screen

Let me take a look at some tzompantli code...

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: Move list Screen

ok, we have a SPECIAL MOVES screen in TZOMPANTLI, my friend the programmer changed a little bit the code and made a custom screen that can display an image (wich i created in photoshop) displaying the selected character move lists... this is a bit old, and also the UFE version is no up to date (this is 1.6 i think), but maybe someone can figure it out better and adapt it to the new versions... or maybe it works already--- remember, i'm no programmer:

First, the DefaultPauseScreen script is a bit changed, in order to get two inputs from the game "ConfirmPlayer1" and "ConfirmPlayer2" , around line 46. This two inputs we can create them in the inputs options from the UFE global config file if we are using cINPUT (wich we used).

https://s5.postimg.org/je1zs5uvr/image.png

DefaultPauseScreen:

using UnityEngine;
using System.Collections;

public class DefaultPauseScreen : PauseScreen{
    #region public instance fields
    public UFEScreen backToMenuConfirmationDialog;
    public UFEScreen[] screens;
    #endregion

    #region protected instance fields
    protected int currentScreen;
    protected bool confirmationDialogVisible = false;
    #endregion

    #region public instance methods
    public virtual void HideBackToMenuConfirmationDialog(){
        this.HideBackToMenuConfirmationDialog(true);
    }

    public virtual void HideBackToMenuConfirmationDialog(bool triggerOnShowScreenEvent){
        if (this.backToMenuConfirmationDialog != null){
            for (int i = 0; i < this.screens.Length; ++i){
                if (this.screens[i] != null){
                    CanvasGroup canvasGroup = this.screens[i].GetComponent<CanvasGroup>();
                    
                    if (canvasGroup != null){
                        canvasGroup.interactable = true;
                    }
                }
            }

            this.HideScreen(this.backToMenuConfirmationDialog);
            this.confirmationDialogVisible = false;

            if (triggerOnShowScreenEvent){
                this.ShowScreen(this.screens[this.currentScreen]);
            }
        }
    }

    public virtual void GoToScreen(int index){
        for (int i = 0; i < this.screens.Length; ++i){
            if (i != index){
                this.HideScreen(this.screens[i]);
            }else{
                if(this.screens[i].ToString().Contains("Moves")==true&&cInput.GetKey("ConfirmPlayer1"))
                {
                    ((DefaultMovesMenuScreen)this.screens[i]).Player1=true;
                }
                if(this.screens[i].ToString().Contains("Moves")==true&&cInput.GetKey("ConfirmPlayer2"))
                {
                    ((DefaultMovesMenuScreen)this.screens[i]).Player2=true;
                }
                this.ShowScreen(this.screens[i]);
            }
        }
        
        this.currentScreen = index;
    }

    public virtual void ShowBackToMenuConfirmationDialog(){
        if (this.backToMenuConfirmationDialog != null){
            for (int i = 0; i < this.screens.Length; ++i){
                if (this.screens[i] != null){
                    CanvasGroup canvasGroup = this.screens[i].GetComponent<CanvasGroup>();
                    
                    if (canvasGroup != null){
                        canvasGroup.interactable = false;
                    }else{
                        this.HideScreen(this.screens[i]);
                    }
                }
            }

            this.ShowScreen(this.backToMenuConfirmationDialog);
            this.confirmationDialogVisible = true;
        }
    }
    #endregion

    #region public override methods
    public override void DoFixedUpdate (){
        base.DoFixedUpdate ();

        if (this.confirmationDialogVisible){
            if (this.backToMenuConfirmationDialog != null){
                this.backToMenuConfirmationDialog.DoFixedUpdate();
            }
        }else{
            if(this.currentScreen >= 0 && this.currentScreen < this.screens.Length && this.screens[this.currentScreen] != null){
                this.screens[this.currentScreen].DoFixedUpdate();
            }
        }
    }

    public override void OnHide (){
        this.confirmationDialogVisible = false;
        this.HideBackToMenuConfirmationDialog(false);
        if (this.currentScreen >= 0 && this.currentScreen < this.screens.Length){
            this.HideScreen(this.screens[this.currentScreen]);
        }
        base.OnHide ();
    }

    public override void OnShow (){
        base.OnShow ();

        this.confirmationDialogVisible = false;
        this.HideBackToMenuConfirmationDialog(false);
        if (this.screens.Length > 0){
            this.GoToScreen(0);
        }
    }

    public override void SelectOption(int option, int player){
        // TODO: select the correct option manually.
        if(this.currentScreen >= 0 && this.currentScreen < this.screens.Length && this.screens[this.currentScreen] != null){
            this.screens[this.currentScreen].SelectOption(option, player);
        }else{

        }
    }
    #endregion

    #region protected instance methods
    protected virtual void HideScreen(UFEScreen screen){
        if (screen != null){
            screen.OnHide();
            screen.gameObject.SetActive(false);
        }
    }

    protected virtual bool IsVisible(UFEScreen screen){
        return screen != null ? screen.IsVisible() : false;
    }
    
    protected virtual void ShowScreen(UFEScreen screen){
        if (screen != null){
            screen.gameObject.SetActive(true);
            screen.OnShow();
        }
    }
    #endregion
}

Then in the pause screen prefab we selected the SpecialMovesScreen
https://s5.postimg.org/l74wfzfx3/image.png

the DefaultMovesMenuScreen is also slighty changed:

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

public class DefaultMovesMenuScreen : DefaultUFEScreen{// DeathlyIdeas
    #region public instance fields
    public Image imageActive;
    public Sprite[] images;
    public bool Player1;
    public bool Player2;
    #endregion
    
    #region public override methods
    public override void DoFixedUpdate(){
        base.DoFixedUpdate();




    }
    
    public override void OnShow (){
        base.OnShow ();

        for (int i=0; i<images.Length; ++i) {
            
//            Debug.Log(images[i].ToString().ToLower());
    //        Debug.Log("-------------------      "+UFE.config.player1Character.name.ToLower());
            if (Player1&&images[i].ToString().ToLower().Contains(UFE.config.player1Character.name.ToLower().Replace("(clone)","")    )) {
                imageActive.sprite = images [i];
            } else if (Player2&&images[i].ToString().ToLower().Contains(UFE.config.player2Character.name.ToLower().Replace("(clone)",""))) {
                imageActive.sprite = images [i];
            }
        }
        //UFE.config.player1Character.name    

        Player1=false;
        Player2=false;
    }
    #endregion
}

Then inside we got a background, a button to close this screen (i think we used the one wich is already there) and an Image wich is the same size as the images we are using for our characters movelists. The image is the one that the movescreen script is asking us for and below as you can see i have a list of the characters in my game, and each element is linked with the image for each character's move list (wich is an image set as an sprite 2d UI).

Very important, the name of the character movelist sprite file must be EXACTLY THE SAME as the Character File (Not the Prefab, the character file, in wich you define it's name, life points, portraits and so on)

https://s5.postimg.org/ybagsov47/image.png

I think that's very much it... as i say, i'm not sure it works exactly the same in the new versions, but i think it can get you in the right direction.

Greetings!

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: Move list Screen

Ill try this out In a bit

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: Move list Screen

how did you set the image? I cant set a Image from the hierarchy

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: Move list Screen

xFTLxKingPhoenix wrote:

how did you set the image? I cant set a Image from the hierarchy

just press right mouse button "new ui element --> image"

and then you set the image in the inspector as the one that's gonna show the moveset.

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: Move list Screen

It Works now

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: Move list Screen

xFTLxKingPhoenix wrote:

It Works now

smile

Had to do any heavy changes?

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: Move list Screen

no It works exactly as you have it. I just did something wrong

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: Move list Screen

The specialmoves screen uses the DefaultuUFEScreen script...is that what I am supposed to modify instead of the Defaultmovescreenscript? Or do I add a defaultmovemenuscreenscript to the Specialsmovescreen?

Re: Move list Screen

You create a defaultmovesscreen.cs and paste what he has there.

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: Move list Screen

So yes you add the new defaultmovesscreen to the specialmoves

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