Question About Toggling

Might be an echo in here, but I’m also trying to set up a toggle to target instead of a separate button to cancel.

I have my Targeting state listening for the targeting event to cancel instead of the cancel event but it only works if I have they key held down, am I missing something to make sure it doesn’t immediately cancel the target state when I press the targeting key?

I can’t remember how this was set up in the course, but I have mine setup like this;

The Target input is exactly the same as the Jump input; fire the event when the button is pressed.
In the combat state I listen to the targeting event. When it fires, I switch to the targeting state.
In the targeting state I have the same and switch back to combat when the event fires.

That’s it. Works like a charm

That’s how I have mine set up as well.

Thanks for the replies.

Turns out I had missed an “!” in the input reader for the OnTarget and OnCancel Events, which was causing the snap back to the FreeLookState. Took longer than I’m proud of to catch that, but all part of the process.

Appreciate the replies though, thank you!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms