Not sure why but now getting these three error codes
Dialogue System: Lua code 'return vGetItemCount(2)' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
Dialogue System: Lua code 'return vGetItemCount(2) < 2' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
Dialogue System: Lua code 'return vGetItemCount(2) >= 2' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
Everything was setup correctly. Unsure what the problem is??
Using Invector Trouble
Re: Using Invector Trouble
Your player character is probably missing the DialogueSystemInvectorBridge component.
-
- Posts: 93
- Joined: Wed Jan 22, 2020 1:20 pm
Re: Using Invector Trouble
I thought the same but he has that component....
Re: Using Invector Trouble
Try unticking your character's vThirdPersonController > Grounded > Use Instance checkbox. Put your character in each gameplay scene instead of having it transfer from one scene to the next. (See Saving, Loading, and Scene Changes)
If it happens when you change scenes, then this may be happening:
If it happens when you change scenes, then this may be happening:
- The new player in the new scene tells the Dialogue System that the Lua functions should refer to its inventory.
- The old player in the old scene transfers to the new scene. It sees that there's a new player in the new scene, and it destroys the new player.
- The new player cleans up after itself when being destroyed, leaving the Lua functions undefined.
-
- Posts: 93
- Joined: Wed Jan 22, 2020 1:20 pm
Re: Using Invector Trouble
Seems like everything is working fine through all node layers of the script and now NPC takes the potions from the character. Thank you so much for your time. I am sure I will have more questions in the future. Cant wait to dig further into what you have created. Thank you
Re: Using Invector Trouble
Glad to help! I'll be here if you have more questions.
-
- Posts: 93
- Joined: Wed Jan 22, 2020 1:20 pm
Re: Using Invector Trouble
Only thing I am noticing now is thus.
Have the quest tracker now popping up in top right of screen showing 0/2 Potions
When i grab said 2 potions it does not update until I return to NPC who gave quest then poof says 2/2 potions.
Guessing I missed a step somewhere here. Thanks
Have the quest tracker now popping up in top right of screen showing 0/2 Potions
When i grab said 2 potions it does not update until I return to NPC who gave quest then poof says 2/2 potions.
Guessing I missed a step somewhere here. Thanks
Re: Using Invector Trouble
Hi,
You need to tell the quest tracker HUD to update when the player's inventory has changed.
Inspect the player and add a DialogueSystemTrigger. Select Add Action > Run Lua Code. Set the Lua Code field to: UpdateTracker()
Inspect the Events section of the player's vItemManager script. Configure the OnAddItem() and OnDropItem() events to call the DialogueSystemTrigger's OnUse method.
You need to tell the quest tracker HUD to update when the player's inventory has changed.
Inspect the player and add a DialogueSystemTrigger. Select Add Action > Run Lua Code. Set the Lua Code field to: UpdateTracker()
Inspect the Events section of the player's vItemManager script. Configure the OnAddItem() and OnDropItem() events to call the DialogueSystemTrigger's OnUse method.