1 (edited by acidfmhq 2017-03-28 18:32:53)

Topic: [Solved]How to gain meter on First Hit?

Been trying to figure this out for a few hours now and found where First Hit is called on screen. From what I'm seeing within the scripting it looks like gaining meter is only set within the current move used.

Would it be possible to set up say a Global Option for gaining meter when this is trigger. This is something we would like to include in our project.

Terrordrome Reign of the Legends Out now on Steam!!
https://store.steampowered.com/app/1291 … e_Legends/
Terrordrome Project Manager

Re: [Solved]How to gain meter on First Hit?

Depends where you want it to show up in the Global options window, but this should get you started.

In GlobalInfo.cs, find

public class RoundOptions {
    public int totalRounds = 3;
    public bool hasTimer = true;
etc...

and add this to the end of the list:

public float firstHitBonus = 0f;

In GlobalEditorWindow.cs find

// Round Options
            EditorGUILayout.BeginVertical(rootGroupStyle);{
                EditorGUILayout.BeginHorizontal();{
                    roundOptions = EditorGUILayout.Foldout(roundOptions, "Round Options", foldStyle);
                    helpButton("global:round");
                }EditorGUILayout.EndHorizontal();
etc...

At the bottom of the roundOptions list, add this:

globalInfo.roundOptions.firstHitBonus = EditorGUILayout.FloatField ("First Hit Bonus", globalInfo.roundOptions.firstHitBonus);

in ControlsScript.cs, find this section and add the line that you are missing:

// Cast First Hit if true
        if (!firstHit && !opControlsScript.firstHit){
            opControlsScript.firstHit = true;
            opControlsScript.AddGauge (UFE.config.roundOptions.firstHitBonus);
            UFE.FireAlert(UFE.config.selectedLanguage.firstHit, opInfo);
        }

In the Global options window, under Round Options, there should be a section at the bottom that says First Hit Bonus, where you can put whatever value you want.

Share

Thumbs up +2 Thumbs down

3 (edited by acidfmhq 2017-03-24 13:29:16)

Re: [Solved]How to gain meter on First Hit?

Nice this works perfect thanks for the help!!!

To mods if possible could we add this to the Tips & Articles forums I believe this would be nice to have their since it kind of is a tutorial.

Terrordrome Reign of the Legends Out now on Steam!!
https://store.steampowered.com/app/1291 … e_Legends/
Terrordrome Project Manager

Re: [Solved]How to gain meter on First Hit?

This is perfect. I've been wanting something like this