Pages 1
Universal Fighting Engine Forum We are no longer using the forum to answer questions due to bot attacks. Please use our discord instead: https://discord.gg/hGMZhF7 |
You are not logged in. Please login or register.
Universal Fighting Engine Forum → Source Coding → Hide the GUI for intros and outros
You could make a script that simply disables the battle gui object when a certain move plays.
I'm fairly certain that you could quite easily code in a way to have everything in the UI as the child of a gameobject and then have that gameobject setactive true/false when you want it in the DefaultBattleGUI.cs script
Along with what Starcutter said, use a move event such as "OnMove" to order the UI to disable when the intro move plays, then use "OnRoundBegins" to renable the UI:
http://www.ufe3d.com/doku.php/code
Nice,
I'm still a beginner when it comes to coding.
Do you have a step by step tutorial so I know where to place the coding?
The link http://www.ufe3d.com/doku.php/code is confusing to me.
Try this script
using UnityEngine;
using UFE3D;
public class ThreadRequest : MonoBehaviour
{
[SerializeField]
private GameObject battleGUI;
[SerializeField]
private string[] moveNames;
// Start is called before the first frame update
void Start()
{
UFE.OnMove += this.OnMove;
UFE.OnRoundBegins += this.OnRoundBegins;
}
void OnDestroy()
{
UFE.OnMove -= this.OnMove;
UFE.OnRoundBegins -= this.OnRoundBegins;
}
private void OnMove(MoveInfo move, ControlsScript player)
{
int length = moveNames.Length;
for (int i = 0; i < length; i++)
{
if (move.moveName == moveNames[i])
{
if (battleGUI != null)
{
battleGUI.SetActive(false);
}
}
}
}
private void OnRoundBegins(int newInt)
{
if (battleGUI != null)
{
battleGUI.SetActive(true);
}
}
}
Universal Fighting Engine Forum → Source Coding → Hide the GUI for intros and outros
Powered by PunBB, supported by Informer Technologies, Inc.