QuestMachine/Invector

Announcements, support questions, and discussion for Quest Machine.
neshko1988
Posts: 7
Joined: Thu Jun 25, 2020 2:14 am

QuestMachine/Invector

Post by neshko1988 »

Hello!

So, I've grabbed Quest Machine, and I'm trying to make it work right. I have followed the tutorial about Invector integration and it works fine to the point where I return to the knight with the shotgun. However, I get the award but the shotgun doesn't remove from inventory(Invector), and the reward text says that I acquire shotgun instead of a short sword.
If I re-import Quest Machine I do not see any errors, but still in my case amount -1 doesn't work.

Any help appreciated, thanks in advance!

This is the error line that I get in Unity

Message System exception sending 'Discuss Quest'/'getShotgun' to MessageQuestCondition(Clone)(Clone) (PixelCrushers.QuestMachine.Wrappers.MessageQuestCondition): Object reference not set to an instance of an object
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestMachine/Invector

Post by Tony Li »

Hi,

What versions of Invector and Quest Machine are you using?

Did you add the scripting define symbol "USE_INVECTOR_INVENTORY" as indicated in the readme file and the PDF manual?

Are there any other errors or warnings in the Console window?
neshko1988
Posts: 7
Joined: Thu Jun 25, 2020 2:14 am

Re: QuestMachine/Invector

Post by neshko1988 »

Thanks for your reply

I'm using the latest version of Quest Machine as it was purchased 2-3 days ago and the latest version of the Invector controller. I have put USE_INVECTOR_INVENTORY as showed in the tutorial. Full console error:

Message System exception sending 'Discuss Quest'/'getShotgun' to MessageQuestCondition(Clone)(Clone) (PixelCrushers.QuestMachine.Wrappers.MessageQuestCondition): Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
PixelCrushers.MessageSystem:SendMessageWithTarget(Object, Object, String, String, Object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:342)
PixelCrushers.MessageSystem:SendMessageWithTarget(Object, Object, String, StringField, Object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:390)
PixelCrushers.QuestMachine.QuestMachineMessages:DiscussQuest(Object, Object, StringField, StringField) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Utility/QuestMachineMessages.cs:230)
PixelCrushers.QuestMachine.QuestGiver:ShowActiveQuest(Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:659)
PixelCrushers.QuestMachine.QuestGiver:StartMostRelevantDialogue() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:590)
PixelCrushers.QuestMachine.QuestGiver:StartDialogue(GameObject) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:533)
UnityEngine.Events.UnityEvent`1:Invoke(GameObject)
PixelCrushers.TriggerEvent:OnTriggerEnter(Collider) (at Assets/Plugins/Pixel Crushers/Common/Scripts/UnityEvents/TriggerEvent.cs:36)
Last edited by neshko1988 on Sun Jun 28, 2020 11:40 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestMachine/Invector

Post by Tony Li »

Hi,

Does the example scene included with the integration work? If so, we can compare scenes to see what's different in yours.
neshko1988
Posts: 7
Joined: Thu Jun 25, 2020 2:14 am

Re: QuestMachine/Invector

Post by neshko1988 »

It works fine on the demo scene. I will try to see what's different, thanks for the advice as I had no idea that there is an Invector demo scene with Quest Machine
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestMachine/Invector

Post by Tony Li »

Sounds good. If you can't find the difference, just let me know and we can dig into it further.
neshko1988
Posts: 7
Joined: Thu Jun 25, 2020 2:14 am

Re: QuestMachine/Invector

Post by neshko1988 »

It was something with my character that triggered the issue. What I've done was to move everything regarded to the quest example, including the character from the shooter example scene, and it works fine so far.

Thanks for your attention and help!
Last edited by neshko1988 on Mon Jun 29, 2020 3:47 pm, edited 2 times in total.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestMachine/Invector

Post by Tony Li »

Glad to help! If you run into any other issues, just let me know.
neshko1988
Posts: 7
Joined: Thu Jun 25, 2020 2:14 am

Re: QuestMachine/Invector

Post by neshko1988 »

I've spent the day trying to make it right but I get the same error, the quest does what it is supposed to do when I don't modify. If I change the shotgunQuest to require e.g. ID0 instead of ID12 player don't receive and don't remove the requested items. Another problem is that after I return the required weapon to the NPC I cannot open my inventory anymore. Control cursor state is off


Thank you
Last edited by neshko1988 on Mon Jun 29, 2020 4:25 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestMachine/Invector

Post by Tony Li »

As a test, in the integration's example scene I simply changed the "Invector remove 1 of item ID 12" [shotgun] to "Invector remove 1 of item ID 0" [axe]. Then I picked up the axe and the shotgun. (Since I didn't update the rest of the quest to check if the player has picked up the axe instead of the shotgun, I had to pick up both to advance the quest to the node where I can turn it in.)

When I turned in the quest, the NPC took the player's shotgun correctly.

Note: Depending on which version of Invector you're using, the axe pickup in the integration's example scene may or may not work. If it doesn't work, you can paste in the axe pickup from your Invector version's demo scene. After you pick it up, press 'i' to check your inventory to make sure Invector actually added it to the player's inventory.

If that doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com?
Post Reply