I do not want my player to have the option of starting dialogue if they are jumping.
Is there a way I can check for "if(playerIsGrounded)" before giving the dialogue option?

Code: Select all
public override void UseCurrentSelection()
{
if (playController.playerIsGrounded)
{
base.UseCurrentSelection();
}
}
Code: Select all
if (playerController.myController.isGrounded)
{
playerController.stateMachine.ChangeState<HDialogueState>();
base.UseCurrentSelection();
}
Code: Select all
"if ((currentUsable != null) && currentUsable.enabled && (currentUsable.gameObject != null) && (Time.time >= timeToEnableUseButton))"
Code: Select all
public override void UseCurrentSelection()
{
if ((currentUsable != null) && currentUsable.enabled && (currentUsable.gameObject != null) && (Time.time >= timeToEnableUseButton))
{
if (playerController.myController.isGrounded)
{
playerController.stateMachine.ChangeState<HDialogueState>();
base.UseCurrentSelection();
}
}
}