Hi
What's the correct way to set a Quest Node State to complete? The manual appears to imply it uses the same states as the quest (so that would mean Success as the complete status). However when I set a quest node to Success via the LUA, the quest itself is marked as complete, along with the Node.
If I use True, which is what is shown in the drop down in the quest editor, then the node doesn't move from active/inactive.
It's probably me, but thought I'd check.
Olly
SetQuestNodeState to complete
Re: SetQuestNodeState to complete
Hi Olly,
A quest state (the overall quest state) can be WaitingToStart, Active, Successful, or Failed (or Abandoned or Disabled).
If you're using Lua, set it using SetQuestState(). Example:
---
An individual quest node state can be Inactive, Active, or True.
Set it using SetQuestNodeState(). When working with the Dialogue System integration, for consistency with Dialogue System terminology use "success" for True. Example:
A quest state (the overall quest state) can be WaitingToStart, Active, Successful, or Failed (or Abandoned or Disabled).
If you're using Lua, set it using SetQuestState(). Example:
Code: Select all
SetQuestState("peskyRabbits", "success")
An individual quest node state can be Inactive, Active, or True.
Set it using SetQuestNodeState(). When working with the Dialogue System integration, for consistency with Dialogue System terminology use "success" for True. Example:
Code: Select all
SetQuestNodeState("peskyRabbits", "returnToNPC", "success")
Re: SetQuestNodeState to complete
Thanks. I wanted to check. I have a problem with one quest being marked as Success=True when a node is marked as success.
I have an object with a dialogue component which uses a LUA to issue the following commands
SetQuestNodeState("Get Game", "Find Game", "success")
However when the node "Find Game" is marked as success, it marks the Success node as True.
I tried to upload a gif of what happens but it's too large to upload.
Any ideas why that might be? I've tried various forms of capitalisation (S, s etc) and also tried True and true.
Olly
I have an object with a dialogue component which uses a LUA to issue the following commands
SetQuestNodeState("Get Game", "Find Game", "success")
However when the node "Find Game" is marked as success, it marks the Success node as True.
I tried to upload a gif of what happens but it's too large to upload.
Any ideas why that might be? I've tried various forms of capitalisation (S, s etc) and also tried True and true.
Olly
Re: SetQuestNodeState to complete
Hi,
In the Quest Editor window, does the Find Game node link to a Success node? If so, then when the Find Game node becomes true, it will automatically activate the Success node. And when a Success node becomes active, it automatically becomes True, which marks the whole quest as successful.
In the Quest Editor window, does the Find Game node link to a Success node? If so, then when the Find Game node becomes true, it will automatically activate the Success node. And when a Success node becomes active, it automatically becomes True, which marks the whole quest as successful.
Re: SetQuestNodeState to complete
Thanks Tony
This is before the LUA command
Then the player grabs a gameobject with a dialogue trigger which issues the following LUA code:
Then the quest node tree shows this:
The second node is success, the third node is now active, which is correct, but the Success node is now also True.
I've tested the LUA code and it happens if I include "SetQuestNodeState("Get Game", "Find Game", "success")". That's enough to trigger the Success to true.
Olly
This is before the LUA command
Then the player grabs a gameobject with a dialogue trigger which issues the following LUA code:
Code: Select all
SetQuestNodeState("Get Game", "Find Game", "success");
SetQuestNodeState("Get Game", "Sell Game", "active")
The second node is success, the third node is now active, which is correct, but the Success node is now also True.
I've tested the LUA code and it happens if I include "SetQuestNodeState("Get Game", "Find Game", "success")". That's enough to trigger the Success to true.
Olly
Re: SetQuestNodeState to complete
Hi Olly,
Those screenshots look blown up to me, and it's a lucky thing. Notice that the line between Find Game and Sell Game is a little thicker than normal. I'd bet that there are actually two lines from Find Game: one to Sell Game, and another to Success. Try moving the Sell Game or Success node, or right-click and select Auto-Arrange Nodes.
Those screenshots look blown up to me, and it's a lucky thing. Notice that the line between Find Game and Sell Game is a little thicker than normal. I'd bet that there are actually two lines from Find Game: one to Sell Game, and another to Success. Try moving the Sell Game or Success node, or right-click and select Auto-Arrange Nodes.