Function too sensitive

You could set a timer when you move the menu option (maybe .5 or 1.0 secs) and when the timer completes it sets a boolean for can move menu selection to true

So something like

FTimerHandle MenuTimerHandle;

if (CanMenuSelectionChange && AxisValue >= 1.0f)
{
    CanMenuSelectionChange = false;
    GetWorld()->GetTimerManager().SetTimer(MenMenuTimerHandle, this, &SDialogueBox::ClearMenuSelectionBlock, MenuDelay, false);
    ChoiceEntryWidget->MoveCursorUp();
}

then in SDialogueBox::ClearMenuSelectionBlock

CanMenuSelectionChange = true; // can move menu selection again

Sorry not 100% on the timer code in UE4

Duh. I’m an idiot, I hadn’t thought of using the timer to reset the boolean. The widget couldn’t have a timer, so I put it all in the player controller with a lambda. Thanks a lot!

In the process of making my dialogue system, I’ve connected the Axis Mappings of both the X and Y axes to character movement as well as cursor movement. However, because of the continuous signal of Axis Mappings, the selection cursor becomes much too sensitive, as it will rapidly flicker between different choices. Here is the relevant code:

In APlayerUnitController.cpp:

if (PlayerUI.IsValid())
			{
				if (PlayerUI->ActiveWidget.IsValid())
				{
					PlayerUI->ActiveWidget->MoveCursorY(AxisValue);
				}
			}

And SDialogueBox.cpp:

if (AxisValue >= 1.0f)
{
   ChoiceEntryWidget->MoveCursorUp();
}
else if (AxisValue <= -1.0f)
{
   ChoiceEntryWidget->MoveCursorDown();
}

MoveCursorUp() and MoveCursorDown() share similar code:

ChoicesArray[CurrentIndex]->ToggleSelection(false);
	if (CurrentIndex != 0)
	{
		CurrentIndex--;
		ChoicesArray[CurrentIndex]->ToggleSelection(true);
	}
	else
	{
		CurrentIndex = LastValidIndex;
		ChoicesArray[CurrentIndex]->ToggleSelection(true);
	}

Where the conditions are simply reversed for MoveCursorDown(). Even checking that AxisValue is at 1 or -1 does not stop the cursor from flickering. I’ve tried using a timer with a delegate, but even that doesn’t seem to solve the problem.

I suggest looking at the input settings in the project preferences, where you can adjust the controller dead zones. It is under “AxisConfig” settings.