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 → General → How to Edit Challenge mode text box.
The UI part of the challenges is all written under OnGUI on file DefaultChallengeModeGUI.cs
You can try changing how it behaves by allocating some of the variables from ChallengeMode.cs into UI elements.
I know the video doesn't touch on this topic in particular, but just in case I'll leave a link to the video tutorial here:
https://youtu.be/BnNyIl9zwvc?si=y1okP7T … &t=446
Hello,
I customized and Challenge mode text box with this code. I hope this can help you and others.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UFE3D;
using UnityEngine.UI;
public class DefaultChallengeModeGUI: ChallengeMode {
public void OnGUI()
{
EngineManager.instance.FindChallengeBox();
if (EngineManager.Logs_initialized) Debug.Log($"{nameof(EngineManager.instance.FindChallengeBox)} in {nameof(DefaultChallengeModeGUI)} GameBite");
if (!complete && !UFE.config.lockInputs && !UFE.config.lockMovements)
{
GUI.Box(new Rect(2000, 100, 250, 400), UFE.GetChallenge(currentChallenge).challengeName);
GUI.BeginGroup(new Rect(3000, 130, 300, 400));
{
if (UFE.GetChallenge(currentChallenge).description == "%list%")
{
string newDesc = "";
int currAction = 0;
foreach (ActionSequence actionSeq in challengeActions)
{
string moveName = actionSeq.specialMove.moveName;
if (currentAction > currAction) moveName += " (DONE)";
newDesc += moveName + "\n";
currAction++;
}
GUILayout.Label(newDesc);
}
else
{
EngineManager.instance.CustomSettings(currentChallenge);
if (EngineManager.Logs_initialized) Debug.Log($"{nameof(EngineManager.instance.CustomSettings)} in {nameof(DefaultChallengeModeGUI)} GameBite");
}
GUI.EndGroup();
if (GUI.Button(new Rect(Screen.width - 12000, 50, 70, 30), "Next Task"))
{
currentAction = challengeActions.Count;
testChallenge();
}
}
}
}
/*
protected override void startNextChallenge()
{
int selectedStage = 0;
if (currentChallenge == 0) selectedStage = 1; // First challenge = 0
UFE.SetStage(UFE.config.stages[selectedStage]);
base.startNextChallenge();
}*/
}
Universal Fighting Engine Forum → General → How to Edit Challenge mode text box.
Powered by PunBB, supported by Informer Technologies, Inc.