Hi,
I'm using QM+DS and Opsive UCC+UIS.
I have a quest which has two counters:Kill(value mode is message) and Shinning Crystal(value mode is Data sync).
And there is a quest node which will become true after player kill 11 enemies and pick up 2 crystals. The conditions count mode is ALL.
The player accept the quest in SceneA, and the problem occurs when scene changes:
1: If player accept the quest in SceneA and don't do anything then change to SceneB, everything works well.
2: If player accept the quest in SceneA and pick up 2 crystals(didn't kill any enemy), jump to SceneB, then the quest node became true(even the counter Kill is 0).
After some tests, I found that this happens when the Quest Node has only 2 conditions and one of the conditions(my test is UIS Item Amount) is true.
Quest Node became True while the conditions not true
Quest Node became True while the conditions not true
- Attachments
-
- 02.png (215.13 KiB) Viewed 771 times
-
- 01.png (161.8 KiB) Viewed 771 times
Re: Quest Node became True while the conditions not true
Hi,
How are you sending the kill message?
Is it possible that the kill message is being sent when you change scenes? If you've configured the enemies to send the message when their GameObjects are deactivated or destroyed, they may be sending the message when Unity destroys them to unload the scene.
If so, and if you're using a Quest Machine component to send the message, how are you changing scenes? Are you using any of the ways listed here?
How are you sending the kill message?
Is it possible that the kill message is being sent when you change scenes? If you've configured the enemies to send the message when their GameObjects are deactivated or destroyed, they may be sending the message when Unity destroys them to unload the scene.
If so, and if you're using a Quest Machine component to send the message, how are you changing scenes? Are you using any of the ways listed here?
Re: Quest Node became True while the conditions not true
Hi Tony,
Thanks for your response.
UCC attribute manager has a death event and the kill message was send after the enemy dead. I don't think that's the Kill message problem, after chaning the scene, the Kill counter is still 0.
I'm not using the ways listed, but I add these code before LoadScene:
And after changing scene I called:
And I also tested with two UIS Item Amount conditions, let's say 2 Crystals and 2 Wood, then the player pick up 2 crystals and change to another scene, the quest node will become true.
As I said above, this happens when the Quest Node has only 2 conditions and one of the conditions(UIS Item Amount) is true.
If there are 3 conditions then it works well.
Thanks for your response.
UCC attribute manager has a death event and the kill message was send after the enemy dead. I don't think that's the Kill message problem, after chaning the scene, the Kill counter is still 0.
Code: Select all
public void OnDeathEvent(Vector3 position, Vector3 force, GameObject attacker){
MessageSystem.SendMessage(this, "EnemyKilled", "Total");
if(GetComponent<QuestEntity>() != null && GetComponent<QuestEntity>().entityType != null){
MessageSystem.SendMessage(this, "EnemyKilled", GetComponent<QuestEntity>().entityType.name);
}
// m_QuestControl.SendToMessageSystem("EnemyKilled:Count:" + 1);
}
Code: Select all
//PixelCrushers
PixelCrushers.SaveSystem.BeforeSceneChange();
PixelCrushers.SaveSystem.RecordSavedGameData();
StartCoroutine(StartLoading(sceneIndex));
Code: Select all
PixelCrushers.SaveSystem.ApplySavedGameData();
As I said above, this happens when the Quest Node has only 2 conditions and one of the conditions(UIS Item Amount) is true.
If there are 3 conditions then it works well.
Re: Quest Node became True while the conditions not true
Hi,
If you tick the Quest Machine GameObject's Debug Settings > Debug checkbox, it will log a lot of activity to the Console. This may help you identify why the quest node is going to the True state.
Also feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look directly and try to identify the issue. Any size project (even large projects) is fine, and all customer files are handled confidentially.
If you tick the Quest Machine GameObject's Debug Settings > Debug checkbox, it will log a lot of activity to the Console. This may help you identify why the quest node is going to the True state.
Also feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look directly and try to identify the issue. Any size project (even large projects) is fine, and all customer files are handled confidentially.
Re: Quest Node became True while the conditions not true
It's my fault, I didn't follow the first step in Integration document:Untick the Inventory System Manager component's Dont Destroy On Load checkbox. This will prevent duplicate copies when loading saved games.
Untick the option and it works as expected.
Thanks Tony.
Untick the option and it works as expected.
Thanks Tony.
Re: Quest Node became True while the conditions not true
Hi,
I'm glad you found the issue!
I'm glad you found the issue!