Hey,
So I am getting around to prototyping a dialogue heavy game and I thought I would do a bare bones starter to see how it all functions.
Now I followed your quick start video as well as the documentation but for the life of me I cannot get the player being able to use an NPC.
My process was:
- Make a new scene
- Add a cube call it player
- Add a sphere call it NPC
- Create dialogue DB
- Run the Dialogue Manager wizard (same settings as in the tutorial vids)
- Create NPC Actor (player already exists)
- Create a dummy conversation between 2 actors
- Run NPC wizard and add the usable component and select the dialogue etc
- Run Player wizard and just leave controller as custom
So now I was expecting when I move the Player (cube) within 5 units of the NPC (sphere) it would show some sort of option for me to interact as the demo scenes do and the videos do. So I am just wondering if there is anything I am missing here as a basic bare bones setup to just get an initial dialogue initiated via a use?
Usable issues... I think
Re: Usable issues... I think
Hi,
You probably need to add a rigidbody to the player or NPC. The wizards try to do as much as possible, and although they provide some basic scripts such as SimpleController but they don't presume to enforce a specific way to configure your player physics and controls.
If I understand your steps correctly, your NPC should already have these components:
If this doesn't help, please let me know. Also feel free to send an example scene to tony (at) pixelcrushers.com. I'll be happy to take a look.
You probably need to add a rigidbody to the player or NPC. The wizards try to do as much as possible, and although they provide some basic scripts such as SimpleController but they don't presume to enforce a specific way to configure your player physics and controls.
If I understand your steps correctly, your NPC should already have these components:
- Transform, Sphere, Sphere Collider, Mesh Renderer.
- Conversation Trigger set to OnUse.
- Another Sphere Collider with Is Trigger ticked and Radius set to the distance at which you want the player to be able to converse.
- Usable.
- Transform, Cube, Box Collider, Mesh Renderer.
- Proximity Selector.
- (Maybe a Set Component Enabled On Dialogue Event to disable Proximity Selector during conversations.)
If this doesn't help, please let me know. Also feel free to send an example scene to tony (at) pixelcrushers.com. I'll be happy to take a look.
Re: Usable issues... I think
Hello!
Right yes the problem was the NPC did not have a 2nd sphere collider on it, so that is good to know.
One other thing that I have noticed is that I do not see any sort of GUI indication at the top "spacebar to interact" etc, and I have a proximity selector script on the player which seems setup normally, the only thing is I am not sure what to put in Gui Skin and Gui Style Name. I have tried putting the wheel gui in there and some of the others and I had no luck but I couldnt find any docs specifically around this area. The dialogue triggers ok so its definitely active.
Again sorry for the simplistic questions I just want to get the bare bones working in isolation before I move on.
Right yes the problem was the NPC did not have a 2nd sphere collider on it, so that is good to know.
One other thing that I have noticed is that I do not see any sort of GUI indication at the top "spacebar to interact" etc, and I have a proximity selector script on the player which seems setup normally, the only thing is I am not sure what to put in Gui Skin and Gui Style Name. I have tried putting the wheel gui in there and some of the others and I had no luck but I couldnt find any docs specifically around this area. The dialogue triggers ok so its definitely active.
Again sorry for the simplistic questions I just want to get the bare bones working in isolation before I move on.
Re: Usable issues... I think
No worries! It's really smart of you to make sure all your tech is in place before moving on to content.
You can leave the Proximity Selector's Gui Skin field unassigned. In this case it will use Unity's default GUI Skin. If you do assign a GUI Skin, you can use the Gui Style Name field to specify which GUI Style to use in the skin. Otherwise it will use the default "label" style.
The Topdown Demo in Assets/Dialogue System/Examples/Feature Demo/Topdown Demo uses a Proximity Selector. You can check it for any differences from your scene. (Or feel free to send me an example of your setup.)
Here are some documentation links:
Another possible issue is if you're using Unity UI. Proximity Selector uses legacy Unity GUI by default. (Some developers still haven't moved to using Unity UI.) You can tell it to use Unity UI elements by setting up a Unity UI Selector Display component. To see Unity UI in action, try out the scenes in Examples/Unity UI Examples.
You can leave the Proximity Selector's Gui Skin field unassigned. In this case it will use Unity's default GUI Skin. If you do assign a GUI Skin, you can use the Gui Style Name field to specify which GUI Style to use in the skin. Otherwise it will use the default "label" style.
The Topdown Demo in Assets/Dialogue System/Examples/Feature Demo/Topdown Demo uses a Proximity Selector. You can check it for any differences from your scene. (Or feel free to send me an example of your setup.)
Here are some documentation links:
- Selectors in How To Set Up the Player
- Proximity Selector
- Selector
Another possible issue is if you're using Unity UI. Proximity Selector uses legacy Unity GUI by default. (Some developers still haven't moved to using Unity UI.) You can tell it to use Unity UI elements by setting up a Unity UI Selector Display component. To see Unity UI in action, try out the scenes in Examples/Unity UI Examples.
Re: Usable issues... I think
ah ok, will give that a go when I get back to the computer later, thanks again for the info.