1

(7 replies, posted in General)

You want to enable and disable objects based on what stance and what move the character is doing?
I can add that sometime.

You can take a look at this post: https://www.ufe3d.com/forum/viewtopic.p … 305#p16305
It boils down to enabling and disabling gameobjects based on what stance the character is in.

3

(7 replies, posted in General)

using System.Collections.Generic;
using UFE3D;
using UnityEngine;

public class NewBehaviourScript1 : MonoBehaviour
{
    private ControlsScript controlsScript;

    [System.Serializable]
    public class Options
    {
        public CombatStances[] combatStances;
        public GameObject[] disableGameObjects;
        public GameObject[] enableGameObjects;
    }
    public Options[] options;

    private void Start()
    {
        controlsScript = GetComponentInParent<ControlsScript>();
    }

    private void Update()
    {
        if (controlsScript != null)
        {
            for (int i = 0; i < options.Length; i++)
            {
                for (int j = 0; j < options[i].combatStances.Length; j++)
                {
                    if (controlsScript.MoveSet.currentCombatStance == options[i].combatStances[j])
                    {
                        SetGameObjectActive(options[i].disableGameObjects, false);
                        SetGameObjectActive(options[i].enableGameObjects, true);
                    }
                }
            }
        }
    }

    #region GameObject Methods

    public static void SetGameObjectActive(GameObject[] gameObject, bool active)
    {
        if (gameObject == null)
        {
            return;
        }

        int length = gameObject.Length;
        for (int i = 0; i < length; i++)
        {
            var item = gameObject[i];

            if (item == null)
            {
                continue;
            }

            item.SetActive(active);
        }
    }

    public static void SetGameObjectActive(List<GameObject> gameObject, bool active)
    {
        if (gameObject == null)
        {
            return;
        }

        int count = gameObject.Count;
        for (int i = 0; i < count; i++)
        {
            var item = gameObject[i];

            if (item == null)
            {
                continue;
            }

            item.SetActive(active);
        }
    }

    #endregion
}

4

(7 replies, posted in General)

Sure thing. I'll edit my post when I can.

5

(4 replies, posted in 3D Gameplay)

You need to use the 3D arena template.
It sounds like you used the 3D fighter template.

6

(14 replies, posted in Source Coding)

Here's a link that might help
https://learn.microsoft.com/en-us/visua … ts=windows

7

(3 replies, posted in General)

UFE 2 doesn't have tag team out of the box.
UFE 3 is functional, but isn't currently being worked on.

8

(6 replies, posted in General)

Hmm, the id is used in a bunch of areas in the code.
I don't fully understand how the id's work either.
Probably just best to keep an eye out in your project if anything strange happens as a result of this change.

9

(5 replies, posted in General)

Yes it's possible.
To do it right would be quite a bit of work I'd imagine.

10

(5 replies, posted in General)

UFE 2 isn't setup to handle items smash bros style.

11

(2 replies, posted in General)

You could use the stance system to handle transformations.

12

(5 replies, posted in General)

I'm really not sure why the first issue is happening.
I can confirm the issue with the custom hit clips.

I can't really say when the next patch will be released.
If we find a solution for the custom hit clip issue I might be able to share the code for it.

13

(5 replies, posted in General)

First Issue:
Not sure why your getting results like that.
Enable the debugger. I need to see the frame data at runtime.

Second Issue:
Your saying that the custom hit clips don't produce the expected results?
I'll have to test this to verify.

14

(4 replies, posted in Source Coding)

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.

15

(4 replies, posted in Source Coding)

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;
    }
}

16

(1 replies, posted in General)

Stamina system: Custom script needed.

Slowing down character movement speed, animation speed and damage: This is probably going to be tricky but, the variables that controls those can be accessed. If you want to have multiplayer support with this, you will likely need the source version and implement those variables with the rollback system. Variables that affect gameplay and can change during runtime need to be implemented properly with rollback in mind.

17

(4 replies, posted in 2D Gameplay)

You might have a Y force being applied on one of your hits on block.
Set Apply Different Block Force to true.
Set the Y Force to 0.
https://i.imgur.com/2M5suBG.png

18

(4 replies, posted in 2D Gameplay)

If you can get me a video of the issue I could better assist you.
I don't think I understand the issue you're facing.
You can look into Jump Options
https://i.imgur.com/j899725.png

19

(3 replies, posted in General)

Here's one way to do it
Create an empty GameObject
https://i.imgur.com/sjN7UsW.png
Create Animation
https://i.imgur.com/UCoPFN2.png
Assign the Animator Controller to an Animator component.
https://i.imgur.com/uw6U6Jp.png

20

(3 replies, posted in General)

It's possible.
Are you trying to loop a sprite based animation?

By Z-Index do you mean sorting order?
The script has a variable you set in the inspector.

This might work.
You can call this method from anywhere at anytime.

    public static void MaybeStopAllUFECameraShakes()
    {
        List<ControlsScript> controlsScriptList = UFE.GetAllControlsScripts();
        if (controlsScriptList == null)
        {
            return;
        }

        int count = controlsScriptList.Count;
        for (int i = 0; i < count; i++)
        {
            if (controlsScriptList[i] == null)
            {
                continue;
            }

            controlsScriptList[i].shakeCameraDensity = 0;
        }
    }

I threw this together, it should work.

using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
    //Attach to your character prefab

    private ControlsScript myControlsScript;

    [SerializeField]
    private int spriteRendererSortingOrder;
         
    private void Start()
    {
        myControlsScript = GetComponentInParent<ControlsScript>();
    }

    private void Update()
    {
        UpdateSpriteRenderer();
    }

    private void UpdateSpriteRenderer()
    {
        if (myControlsScript == null
            || myControlsScript.mySpriteRenderer == null)
        {
            return;
        }

        if (myControlsScript.currentBasicMove == BasicMoveReference.Idle)
        {
            myControlsScript.mySpriteRenderer.sortingOrder = spriteRendererSortingOrder;
        }
    }
}

Using move files this is doable.
Out of the box UFE 2 doesn't have air control for jumps like smash bros.

25

(1 replies, posted in General)

Enable the Update when offscreen option in the Skinned Mesh Renderer component to see if it helps
https://i.imgur.com/jy2fQ3m.png