Player Knight Controller?

Announcements, support questions, and discussion for Quest Machine.
Post Reply
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Player Knight Controller?

Post by QuestHole »

I am assuming that the script Player Knight Controller is not required if I have a functioning character in the scene already.

I can't get this to work. Spent hours on trying to set things up. The video moves too fast and seems out of date.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player Knight Controller?

Post by Tony Li »

Hi,

Please let me know how I may help.

The Quest Machine videos are up to date. The Player Knight Controller is not required. It's just provided in the tutorial assets so you don't have to set up your own controller just to go through the tutorials. The Quest Machine Extras page contains the completed tutorial files. (direct download) The tutorial assets' grass terrain in the tutorial scene looks a bit strange in Unity 2020+ (and will be updated soon) but the tutorial otherwise works fine in all versions of Unity.

If you're using your own controller, please let me know what step or activity isn't working for you yet.
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Re: Player Knight Controller?

Post by QuestHole »

I did everything over and over and can't get the player to trigger the non-quest "hello"
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player Knight Controller?

Post by Tony Li »

Hi,

If you're following along with Tutorial 1: Scene Setup, make sure your player and the NPC both have rigidbodies and colliders. Tick the "Is Trigger" checkbox on the NPC's collider.

Check the player and NPC GameObject layers. If you're making a 3D game, check the collision matrix in Edit > Project Settings > Physics to make sure the player and NPC are on layers that will register collisions. If you're making a 2D game, check Edit > Project Settings > Physics 2D. Also select menu item Tools > Pixel Crushers > Common > Misc > Enable Physics2D Support if you're making a 2D game. (If you're making a 2D game, remember to add a Rigidbody2D and 2D collider, not the 3D versions.)

Add a Quest Giver component and a Trigger Event to the NPC. The Trigger Event has a Tag Mask. Make sure the player GameObject's tag is in the Tag Mask. Configure the Trigger Event's OnTriggerEnter() UnityEvent to call the NPC's QuestGiver.StartDialogueWithPlayer method.

If that doesn't work, please confirm that the Tutorial 1 final scene included in the tutorial assets works correctly.

If so, then when you play your own scene, are there any errors or warnings in the Console window?

I'm finishing work for the night, but I'll check back first thing in the morning.
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Re: Player Knight Controller?

Post by QuestHole »

Thanks for the reply. I tried everything. I worked on this all day. I redownloaded and imported QM. Created new scenes. Everything.

So the demo works fine but my little trigger scene doesn't. I did everything in your post.

The only thing I can think of is that I am using the Opsive Character Controller. Does that need some kind of special thing?
Thanks
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Re: Player Knight Controller?

Post by QuestHole »

Got it to work!!!!!!!

I had to go into the Unity3rdPersonStarterCharacter and assign the Capsule Collider the Player Tag. Didn't work at the higher level.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player Knight Controller?

Post by Tony Li »

Great! I'm glad you got it to work. If any other questions come up, let me know.
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Re: Player Knight Controller?

Post by QuestHole »

Thank you.
Post Reply