Inputs not registering?
Inputs not registering?
Hi!
I recently purchased the dialogue system and I'm still setting up stuff. I can get conversations to work with a trigger collider and a dialogue system trigger set to "On Trigger Enter" on the NPC, along with a trigger collider on the Player.
I can't figure out how to make it work with OnUse though. I put a "Usable" component on the NPC, set its range to a generous amount and put a Proximity Selector component to the Player. I tried using different keys in the "Use Keys" variable but it doesn't work. The proximity is detected because when I get close to the NPC I get the heads up "Press Space bar to talk" but I can't start the conversation.
What am I doing wrong?
I recently purchased the dialogue system and I'm still setting up stuff. I can get conversations to work with a trigger collider and a dialogue system trigger set to "On Trigger Enter" on the NPC, along with a trigger collider on the Player.
I can't figure out how to make it work with OnUse though. I put a "Usable" component on the NPC, set its range to a generous amount and put a Proximity Selector component to the Player. I tried using different keys in the "Use Keys" variable but it doesn't work. The proximity is detected because when I get close to the NPC I get the heads up "Press Space bar to talk" but I can't start the conversation.
What am I doing wrong?
Re: Inputs not registering?
Hi,
Are there any errors or warnings in the Console window?
If your Dialogue System Trigger's Trigger dropdown set to OnUse?
What input system are you using? Unity's default input manager, Rewired, Input System package, etc?
Are there any errors or warnings in the Console window?
If your Dialogue System Trigger's Trigger dropdown set to OnUse?
What input system are you using? Unity's default input manager, Rewired, Input System package, etc?
Re: Inputs not registering?
Hi!
I get no error nor logs in the console window, my dialogue system trigger is indeed set to OnUse and I'm using the "new" input system. Hope this helps!
I get no error nor logs in the console window, my dialogue system trigger is indeed set to OnUse and I'm using the "new" input system. Hope this helps!
Re: Inputs not registering?
Hi,
Since you're using the new Input System package, what have you assigned to the Use Key and Use Button fields?
Regular keyboard keys should generally work since the Dialogue System does a pretty good job of translating KeyCodes enums to Input System key definitions. There may be some exceptions, though.
For Use Button, you need to register your "use" input action with the Dialogue System as described in the Dialogue System's Input System video tutorial or page 5 of Input_Device_Manager_Manual.pdf.
Since you're using the new Input System package, what have you assigned to the Use Key and Use Button fields?
Regular keyboard keys should generally work since the Dialogue System does a pretty good job of translating KeyCodes enums to Input System key definitions. There may be some exceptions, though.
For Use Button, you need to register your "use" input action with the Dialogue System as described in the Dialogue System's Input System video tutorial or page 5 of Input_Device_Manager_Manual.pdf.
Re: Inputs not registering?
Ok so I didn't actually make the script to register the actions. Using the provided example code, I get the errors 'Cannot resolve symbol Controls' and 'Cannot resolve symbol MyControls'.
I'm guessing one of these is the name of the Input Action Asset, what is the other one?
I'm guessing one of these is the name of the Input Action Asset, what is the other one?
Re: Inputs not registering?
Little update, I created a script to register the actions just like in the video tutorial and the docs, but I still can't get to start a dialogue using OnUse. What could I be missing?
Re: Inputs not registering?
Hi,
Would you please post a screenshot of your ProximitySelector component's Use Key and Use Button fields?
Double-checking: Are there any errors or warnings in the Console window? Check the toggles in the upper right to make sure the Console window isn't hiding errors and warnings.
Would you please post a screenshot of your ProximitySelector component's Use Key and Use Button fields?
Double-checking: Are there any errors or warnings in the Console window? Check the toggles in the upper right to make sure the Console window isn't hiding errors and warnings.
Re: Inputs not registering?
Hi!
No errors are hiding. I even tried putting this script somewhere
And it logs properly, so I'm guessing the problem is due to me not setting up things correctly in the selector.
I'm not too sure how to upload images, I'll try my best, here's the proximity selector:
and the input action asset
finally, the npc
As I said, the game correctly detects when I'm close to the npc and prompts me to press the spacebar to start the dialogue, so the proximity selector seems to work properly, it's only starting the dialogue that gives me issues.
Thank you!
No errors are hiding. I even tried putting this script somewhere
Code: Select all
if (InputDeviceManager.IsKeyDown(KeyCode.Space))
{
print("If you see this, I logged correctly");
}
I'm not too sure how to upload images, I'll try my best, here's the proximity selector:
and the input action asset
finally, the npc
As I said, the game correctly detects when I'm close to the npc and prompts me to press the spacebar to start the dialogue, so the proximity selector seems to work properly, it's only starting the dialogue that gives me issues.
Thank you!
Re: Inputs not registering?
I'm facepalming so hard right now that you can't even begin to understand.
For some obscure reason, my Player was not tagged as Player anymore (the "Untagged" label was in bold, so it changed for some unknown reason) and that's why it stopped working.
As always, the solution is always a dumb thing
Thank you for taking your time to help me debug this anyways, I really appreciate it
For some obscure reason, my Player was not tagged as Player anymore (the "Untagged" label was in bold, so it changed for some unknown reason) and that's why it stopped working.
As always, the solution is always a dumb thing
Thank you for taking your time to help me debug this anyways, I really appreciate it
Re: Inputs not registering?
Happy to help! Glad you got it working.