Page 1 of 1
Add item in AC
Posted: Mon Feb 26, 2018 4:08 pm
by thehazard
Hi,
I'm having problem changing the item count for adventure creator items. I've added the adventure creator bridge to my dialogue manager and ticked copy variables and items to and from AC. It seems the conditions are working if I add Item["Item"].Count >= 1. That means the item information is being copied to the dialogue system right? But if I change the item count, AC doesn't register the change after the conversation ends. Any ideas on how to fix this?
Re: Add item in AC
Posted: Mon Feb 26, 2018 9:14 pm
by Tony Li
Hi,
Make sure the Adventure Creator Bridge's Sync Settings > Back to AC > Copy Dialogue System To AC Item Counts checkbox is ticked.
Also, if you want the player to have more than one of an item, in AC you must tick the item's "Can carry multiple?" checkbox.
Re: Add item in AC
Posted: Mon Feb 26, 2018 10:04 pm
by thehazard
Hi Tony,
Thanks for your reply. Yes, I've already ticked all those checkboxes.
I'm trying to remove the item by using this command, Item["Item1"].Count = 0
In the log, it says "Dialogue System: Saved data: Item["Item1"]={Name="Item1", Description="", Is_Item=true, AC_ID=13, Count=0, };"
That's the correct ID number for that AC item and it seems like the count is 0, but the item is still in my inventory after the conversation. It seems I'm also getting this error, "Object reference not set to an instance of an object". I'm not sure what's the cause of this error.
Re: Add item in AC
Posted: Mon Feb 26, 2018 10:32 pm
by Tony Li
No, you don't need to add them to the dialogue database. The bridge will automatically take care of that.
Try setting the Dialogue Manager's
Debug Level to
Info.
I tested adding one "Prop sword" during a conversation, and then deleting it during another conversation.
At the end of the conversation where it's added, the Console shows:
Code: Select all
Dialogue System: Added 1 Prop sword to inventory
At the end of the conversation when it's removed:
Code: Select all
Dialogue System: Removed 1 Prop sword from inventory
I don't know if this has any relevance, but if you're using the AC() sequencer command in your dialogue entry nodes'
Sequence fields, it syncs from Lua to AC before running the AC actionlist. When the AC actionlist is done, it syncs from AC back to Lua.
If none of that helps, would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com or reply here with reproduction steps?