Page 1 of 2
QuestMachine/Invector
Posted: Sun Jun 28, 2020 5:00 am
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
Re: QuestMachine/Invector
Posted: Sun Jun 28, 2020 8:14 am
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?
Re: QuestMachine/Invector
Posted: Sun Jun 28, 2020 10:03 am
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)
Re: QuestMachine/Invector
Posted: Sun Jun 28, 2020 11:35 am
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.
Re: QuestMachine/Invector
Posted: Sun Jun 28, 2020 1:17 pm
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
Re: QuestMachine/Invector
Posted: Sun Jun 28, 2020 2:42 pm
by Tony Li
Sounds good. If you can't find the difference, just let me know and we can dig into it further.
Re: QuestMachine/Invector
Posted: Mon Jun 29, 2020 1:34 pm
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!
Re: QuestMachine/Invector
Posted: Mon Jun 29, 2020 1:57 pm
by Tony Li
Glad to help! If you run into any other issues, just let me know.
Re: QuestMachine/Invector
Posted: Mon Jun 29, 2020 3:52 pm
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
Re: QuestMachine/Invector
Posted: Mon Jun 29, 2020 4:24 pm
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?