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 → Guage Drain / Decrease To An Opponent
not possible out of the box. i remember doing this an old project but i dont remember exactly what i did.
how exactly are you trying to it?
2 ways i can think of off the top of my head
player 1 does move that hits player 2. and the simple hit causes gauge drain
this requires source coding
option 2
player 1 does a move that causes a player override on hit or grab. and the override causes gauge drain. this does not require coding. but it means the move will be considered a grab/atk grab. and not just a normal hit
@xFTLxKingPhoenix
What I envision on doing is when Player 1 hits super move on Player 2, Player 2's guage(which is tied to a super move) is drained so it prevents them from executing that super move
so are all super moves "cinematic"? as in you use opponent override after the super lands?
if you do this version you dont need any code.
if not then you need code
Sorry, I shouldn't said super move. I execute a projectile move that drains the opponent's guage when it hits them.
then you definitely need code. i did this in an older project its not difficult but does require modifying a few different scripts
look up the RemoveGauge in the ControlsScript.cs
Re: xFTLxKingPhoenix : I saw RemoveGauge in the ControlsScript.cs
If I did tinker around the code, where would I place it anywhere in UFE so that the RemoveGauge would effect the opponent?
definitely need Moveeditorwindow.cs under "// Begin Gauge Options"
and then in the moveinfo.cs.
i know you need this file but i dont remember where you need to code it
just implemented it after the last message
files needed:
ControlsScript.cs
GaugeInfo.cs
MoveEditorWindow.cs
Projectile.cs
I can Post the solution. but you should try to see if you can figure it out first
@xFTLxKingPhoenix - I'm stumped on this issue. I look forward to your solution
open ControlsScript.cs
ctrl+F search this
projectile.opGaugeGainOnParry = move.gauges.Length > 0 ? move.gauges[0]._opGaugeGainOnParry : 0;
directly under paste this
//Drain Opponent Gauge on Hit/Block - EternalRiftStudios
projectile.opGaugeLossOnHit = move.gauges.Length > 0 ? move.gauges[0]._opGaugeLossOnHit : 0;
projectile.opGaugeLossOnBlock = move.gauges.Length > 0 ? move.gauges[0]._opGaugeLossOnBlock : 0;
//Drain Opponent Gauge on Hit/Block - EternalRiftStudiosEND
Ctrl+F Search
opControlsScript.AddGauge(gaugeInfo._opGaugeGainOnBlock, (int)gaugeInfo.targetGauge);
paste directly under
//Drain Opponent Gauge on Hit/Block - EternalRiftStudios
opControlsScript.RemoveGauge(gaugeInfo._opGaugeLossOnBlock, (int)gaugeInfo.targetGauge);
//Drain Opponent Gauge on Hit/Block - EternalRiftStudiosEND
Ctrl+F Search
opControlsScript.AddGauge(gaugeInfo._opGaugeGainOnHit, (int)gaugeInfo.targetGauge);
paste directly under
//Drain Opponent Gauge on Hit/Block - EternalRiftStudios
opControlsScript.RemoveGauge(gaugeInfo._opGaugeLossOnHit, (int)gaugeInfo.targetGauge);
//Drain Opponent Gauge on Hit/Block - EternalRiftStudiosEND
SAVE!!
open GaugeInfo.cs
Ctrl+F search
public Fix64 _opGaugeGainOnHit;
paste this directly under
//Drain Opponent Gauge on Hit/Block - EternalRiftStudios
public Fix64 _opGaugeLossOnHit;
public Fix64 _opGaugeLossOnBlock;
//Drain Opponent Gauge on Hit/Block - EternalRiftStudiosEND
SAVE!!
Open MoveEditorWindow.cs
Ctrl+F Search
moveInfo.gauges[i]._opGaugeGainOnParry = StyledSlider("Gauge Gain on Parry (%)", (float)moveInfo.gauges[i]._opGaugeGainOnParry, EditorGUI.indentLevel, 0, 100);
paste under
//Drain Opponent Gauge on Hit/Block - EternalRiftStudios
moveInfo.gauges[i]._opGaugeLossOnHit = StyledSlider("Gauge Loss on Hit (%)", (float)moveInfo.gauges[i]._opGaugeLossOnHit, EditorGUI.indentLevel, 0, 100);
moveInfo.gauges[i]._opGaugeLossOnBlock = StyledSlider("Gauge Loss on Block (%)", (float)moveInfo.gauges[i]._opGaugeLossOnBlock, EditorGUI.indentLevel, 0, 100);
//Drain Opponent Gauge on Hit/Block - EternalRiftStudiosEND
SAVE!!
Open Projectile.Cs
CTRL+F search
public Fix64 opGaugeGainOnParry { get; set; }
paste under
//Drain Opponent Gauge on Hit/Block - EternalRiftStudios
public Fix64 opGaugeLossOnBlock { get; set; }
public Fix64 opGaugeLossOnHit { get; set; }
//Drain Opponent Gauge on Hit/Block - EternalRiftStudiosEND
SAVE!!
the end.
@xFTLxKingPhoenix : Thank you! UFE should consider adding your solution to their next update.
I got your solution to work when added the varibles to GaugeInfo.cs
public Fix64 _opGaugeLossOnHit;
public Fix64 _opGaugeLossOnBlock;
This solution works for a main character but not for an assist. My assist character launches a projectile, and that projectile drains an opponent's gauge.
There has to be a way to do decrese an opponent's guage in the Projectiles section (Collision Options> Damage Options) of the Move editor.
so do you set the gauge decreases on the assist characters movefile?
@xFTLxKingPhoenix : Yes, I tried and it didn't work
i just tested it.... sadly it works perfectly with assists who physically attack ill go back in and add some variables for projectiles
Hello, I'm following up on any new developments on this issue.
Not gonna lie i forgot about this because of work. ill try to check it out
I was able to decrease an opponent's guage using an Assit's projectile.
I made the following modifications at line 342 of ProjectileMoveScript.cs
if (data.hitEffectsOnHit)
{
// Enter code here to check if this is the specific projectile that you want to drain an Opponent's guage
opControlsScript.GetHit(hit, 30, collisionVectors, data.obeyDirectionalHit, myControlsScript);
if(opControlsScript.playerNum == 1)
{
UFE.p1ControlsScript.currentGaugesPoints[0] = UFE.p1ControlsScript.myInfo.maxGaugePoints / UFE.p1ControlsScript.myInfo.maxGaugePoints;
UFE.p1ControlsScript.currentGaugesPoints[1] = UFE.p1ControlsScript.myInfo.maxGaugePoints / UFE.p1ControlsScript.myInfo.maxGaugePoints;
}
if(opControlsScript.playerNum == 2)
{
UFE.p2ControlsScript.currentGaugesPoints[0] = UFE.p2ControlsScript.myInfo.maxGaugePoints / UFE.p2ControlsScript.myInfo.maxGaugePoints;
UFE.p2ControlsScript.currentGaugesPoints[1] = UFE.p2ControlsScript.myInfo.maxGaugePoints / UFE.p2ControlsScript.myInfo.maxGaugePoints;
}
}
I'm sure there's a more efficient way to do this. Be my guest if you want to change it.
Universal Fighting Engine Forum → Source Coding → Guage Drain / Decrease To An Opponent
Powered by PunBB, supported by Informer Technologies, Inc.