Pages 1
Universal Fighting Engine Forum Due to increased bot activity, we have discontinued support through the forum. For assistance, questions, and community discussions, please join our official Discord server |
You are not logged in. Please login or register.
Universal Fighting Engine Forum → Source Coding → Prevent Guage Drain When Round Ends
I just glanced at the gauge code and found a couple variables of interest.
Let me know if this works for you.
using FPLibrary;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
private void OnEnable()
{
UFE.OnRoundEnds += OnRoundEnds;
}
private void OnDisable()
{
UFE.OnRoundEnds -= OnRoundEnds;
}
private void OnRoundEnds(ControlsScript winner, ControlsScript loser)
{
UFE.p1ControlsScript.gaugeDPS = (Fix64)0;
UFE.p1ControlsScript.inhibitGainWhileDraining = false;
UFE.p2ControlsScript.gaugeDPS = (Fix64)0;
UFE.p2ControlsScript.inhibitGainWhileDraining = false;
}
}
It didn't work. I attached this code to each of my character prefab. Is that where the code was supposed to be?
It doesn't really matter where you put this code, it targets both players.
I'll have to investigate more if this doesn't work.
I think I found it in FluxCapacitor.cs
In EndRound() I found
p1ControlsScript.ResetDrainStatus(true);
p2ControlsScript.ResetDrainStatus(true);
I set them to (false)
Universal Fighting Engine Forum → Source Coding → Prevent Guage Drain When Round Ends
Powered by PunBB, supported by Informer Technologies, Inc.