3rd person controller: not going in to the targeting state correctly

I’m having an issue with going in and out of the target state. Whenever I press tab, it’ll go into the targeting state, but when I press escape nothing happens. When I press tab again, it will take me out of the targeting state. Back in the video when we had to do the challenge of actually setting up the button configurations, I initially set it up for tab to go in and also tab to cancel out of targeting. I assumed that’s what we’re going to do. After the solution to the challenge was presented, I changed it over to Escape for cancel but for some reason it’s taking my first approach to the button configuration, it least that is what i think is happening. I went into the control script and did a search for tab and saw that it was set to target and that there were no other instances of the word tab and then I did a search for escape and it was set to the instance of cancel and that there are no other instances of the word escape in that script. I busted out the Xbox controller and the same thing happens with that the right trigger goes in and out of the targeting state. I can’t remember which buttons I initially put to those states before the challenge unfortunately.





I tried to troubleshoot by going into the controls changing target to E and cancel to Q saved it started the game and the same thing happened but with for those keys. When I press E it would take me into the state but when I pressed Q nothing would happen I press E and it would then cancel the state. If I press Q when I’m out of the state, still nothing happens.

It’s because you are listening for the ‘Targeting’ key to exit the Targeting state.
image
These two (in the PlayerTargetingState) should be CancelEvent, not TargetEvent

1 Like

@bixxario is spot on here.
It should be noted that some players actually prefer the tab-select, tab-deselect model.

Another common setup is to subcribe to both TargetEvent and CancelEvent in the Targeter and link them both to OnCancel.

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

Privacy & Terms