Re: 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;
}
}
Re: Prevent Guage Drain When Round Ends
It didn't work. I attached this code to each of my character prefab. Is that where the code was supposed to be?
Re: Prevent Guage Drain When Round Ends
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.
Re: Prevent Guage Drain When Round Ends
I think I found it in FluxCapacitor.cs
In EndRound() I found
p1ControlsScript.ResetDrainStatus(true);
p2ControlsScript.ResetDrainStatus(true);
I set them to (false)