How do I get rid of "Spacebar to interact" message?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

How do I get rid of "Spacebar to interact" message?

Post 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?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How do I get rid of "Spacebar to interact" message?

Post 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.
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

Re: How do I get rid of "Spacebar to interact" message?

Post 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.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How do I get rid of "Spacebar to interact" message?

Post 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.
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

Re: How do I get rid of "Spacebar to interact" message?

Post 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.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How do I get rid of "Spacebar to interact" message?

Post 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.
lostmushroom
Posts: 194
Joined: Mon Jul 01, 2019 1:21 pm

Re: How do I get rid of "Spacebar to interact" message?

Post by lostmushroom »

Cool, got it working! Thanks :D
Post Reply