FPShooter sideway/forward dash?

I’m in quite a pickle right now. My goal with this script is to make a sideways (right/left) and forward individual dashes. It contains multiple problems and I consider myself a complete noob when it comes to scripting. If someone has an alternative or solution of some sort I would be eternally grateful. The problems with this script are quite a few:
(-)First when I rotate the camera the dashes don’t move relatively to it, that dash’s movement are always with relation the the X/Z world axis
(-)Second, when i try to make the forward dash (Q and E keys simultaneously) it registers the 3 different dashes, left, right and forward.
(-)Lastly my character is obviously affected by gravity, is there a way to disable it while I’m dashing.

//private var isDashing = false; was originally going to, but not using
var strength : int = 20;
var dashCost = 25;
private var canDash = true;


function Update () 
{	
	if(Master.StaminaPoints < 25 )
		{
			canDash = false;
		}
	else
		{
			canDash = true;
		}
	
	if(Input.GetKeyDown("e") && canDash == true)
		{
			Debug.Log("Dash Right");
			gameObject.GetComponent(CharacterMotor).SetVelocity(Vector3.right * strength);
			audio.Play();
			Master.StaminaPoints = Master.StaminaPoints - dashCost;
		}
	
	if(Input.GetKeyDown("q") && canDash == true)
		{
			Debug.Log("Dash Left");
			gameObject.GetComponent(CharacterMotor).SetVelocity(Vector3.left * strength);
			audio.Play();
			Master.StaminaPoints = Master.StaminaPoints - dashCost;
		}
	
	if(Input.GetKeyDown("q") && Input.GetKeyDown("e") && canDash == true)
		{
			Debug.Log("Dash Forward");
			gameObject.GetComponent(CharacterMotor).SetVelocity(Vector3.forward * strength);
			audio.Play();
			Master.StaminaPoints = Master.StaminaPoints - dashCost;
		}
}
  1. Try using transform.right etc. instead of Vector3.right. If that doesn’t help, look into the Character Motor script and see how movement is accomplished there.

  2. Try calling the dashes with Input.GetKeyUp. Use GetKey to check if both Q and E are held down, and if yes, set a boolean “forwardDash” to true, and call the forward dash function. For the GetKeyUp check, add an if statement to check if “forwardDash” is set to false. If yes, then call either left or right dashing. If not, then only set dashing to false.

  3. The CharacterMotor script has variables for Gravity and MaxFallSpeed.