Topic: Guage Drain / Decrease To An Opponent

How can I drain or decrease the guage of an opponent after I hit them with a move.

Also, how could I add that function in the Move Editor?

Share

Thumbs up Thumbs down

Re: 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

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

@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

Share

Thumbs up Thumbs down

4 (edited by xFTLxKingPhoenix 2022-11-14 15:19:51)

Re: Guage Drain / Decrease To An Opponent

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

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

Sorry, I shouldn't said super move. I execute a projectile move that drains the opponent's guage when it hits them.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

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

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

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?

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An 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

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

just implemented it after the last message

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

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

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

@xFTLxKingPhoenix - I'm stumped on this issue. I look forward to your solution

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

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.

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up +2 Thumbs down

Re: Guage Drain / Decrease To An Opponent

@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.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

so do you set the gauge decreases on the assist characters movefile?

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

@xFTLxKingPhoenix : Yes, I tried and it didn't work

Share

Thumbs up Thumbs down

16 (edited by xFTLxKingPhoenix 2022-11-25 01:15:34)

Re: Guage Drain / Decrease To An Opponent

i just tested it.... sadly it works perfectly with assists who physically attack ill go back in and add some variables for projectiles

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up +1 Thumbs down

Re: Guage Drain / Decrease To An Opponent

Hello, I'm following up on any new developments on this issue.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

Not gonna lie i forgot about this because of work.  ill try to check it out

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Guage Drain / Decrease To An Opponent

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.

Share

Thumbs up Thumbs down