Post by shadex on Dec 1, 2018 18:08:14 GMT
Was playing with a new dodge, and was attempting to override it. I don't get any compile errors, however the character no longer moves (inputVerticle and InputHorizontal stay at 0 despite the keypress). Attack works, but is in place. Think i might be forgeting to initialize something? Anyways, any help is appreciated.
using System.Collections;
using System.Collections.Generic;
using Invector;
using Invector.vCharacterController;
using UnityEngine;
public class XAdvancedController : vThirdPersonController
{
/// <summary>
/// Cache the hash to the InputMagnitude parameter ID.
/// </summary>
public static readonly int param_RollTrigger = Animator.StringToHash("RollTrigger");
[vEditorToolbar("Rolling")]
/// <summary>
/// Stamina recovery delay override for rolling.
/// </summary>
[Tooltip("Stamina recovery delay override for rolling")]
public float RollStaminaRecoveryDelay = 2f;
protected override void Start()
{
base.Start();
}
public override void Roll()
{
bool staminaCondition = currentStamina > rollStamina;
// can roll even if it's on a quick turn or quick stop animation
bool actionsRoll = !actions || (actions && (quickStop));
// general conditions to roll
bool rollConditions = (input != Vector2.zero || speed > 0.25f) && actionsRoll && isGrounded && staminaCondition && !isJumping;
if (!rollConditions || isRolling) return;
// animator.CrossFadeInFixedTime("Roll", 0.1f);
isRolling = true;
animator.SetTrigger(param_RollTrigger);
Debug.Log("Testing Roll");
ReduceStamina(rollStamina, false);
currentStaminaRecoveryDelay = RollStaminaRecoveryDelay;
}
}