Page 1 of 1
How do I get rid of "Spacebar to interact" message?
Posted: Fri Aug 09, 2019 12:55 pm
by lostmushroom
Hey, I made an NPC following the quick start guide and it constantly has a message on screen saying NPC (spacebar to interact). I can't figure out where this is in the UI. How do I delete it?
Re: How do I get rid of "Spacebar to interact" message?
Posted: Fri Aug 09, 2019 1:06 pm
by Tony Li
That's the selector UI. If you're not using a Selector or Proximity Selector component, you can inspect the Dialogue Manager's Instantiate Prefabs component and remove Standard UI Selector Elements from the Prefab list. It should hide automatically, though, so there's probably something else to this. If you're not using Selector or Proximity Selector, remove the Usable components from GameObjects in your scene.
Re: How do I get rid of "Spacebar to interact" message?
Posted: Fri Aug 09, 2019 1:14 pm
by lostmushroom
If I remove it from Instatiate Prefabs, it still shows up and seems to function the same. Weird. Removing the Usable component just makes it that you can't interact with the NPC.
I'm pretty sure I've screwed something up along the way here...
What I'd actually like is to be able to click anywhere on screen to initiate the conversation, and for there to be no prompts or text of any kind.
Re: How do I get rid of "Spacebar to interact" message?
Posted: Fri Aug 09, 2019 1:31 pm
by Tony Li
Got it. Here's one way: Remove the Selector component and all Usable components in the scene. Add a Canvas with a UI button that covers the whole screen. (If you want to make it invisible, set the Image's Color > alpha to zero.) Configure the UI button to call the Dialogue System Trigger's OnUse() method.
Add a Dialogue System Events component to the Dialogue Manager GameObject. Configure the OnConversationStart() event to disable the Canvas. Configure OnConversationEnd() to re-enable it.
Re: How do I get rid of "Spacebar to interact" message?
Posted: Sat Aug 10, 2019 2:09 pm
by lostmushroom
Is there a way to have the selector use a mouse click instead of a key? I've actually got it pretty close to what I'm aiming for, I just can't figure out how to change that.
Re: How do I get rid of "Spacebar to interact" message?
Posted: Sat Aug 10, 2019 2:14 pm
by Tony Li
Sure! Set the Selector's Key to Mouse 0, or assign an input button (such as "Fire1") that's assigned to the mouse button.
Re: How do I get rid of "Spacebar to interact" message?
Posted: Sat Aug 10, 2019 2:29 pm
by lostmushroom
Cool, got it working! Thanks