My character only does his combo once

So i followed this tuto :

and i did all the same and my combo work well !

BUT, i can only do it once… I think it s because the “combo” int stay on 1 or 2 when i end the combo, but i am not sure.

If someone can help me :slight_smile:

public class PlayerCombat : MonoBehaviour
{
    public Animator anim;
    public int combo;
    public bool attack;

    // Start is called before the first frame update
    void Start()
    {
        anim = GetComponent<Animator>();
    }

    public void Start_Combo()
    {
        attack = false;
        if (combo < 3)
        {
            combo++;
        }
    }

    public void Finish_Anim()
    {
        attack = false;
        combo = 0;
    }

    public void Combos_()
    {
        if (Input.GetMouseButtonDown(0) && !attack)
        {
            attack = true;
            anim.SetTrigger("" + combo);
        }
    }

    // Update is called once per frame
    void Update()
    {
        Combos_();
    }  
    
}

Check your animator, probably code is right but transitions or animation events not correctly modified. Debug animator and game at he same time on editor and see the problem.