Hello everyone.
First I want to thank you for this wonderful dialog system.
Just a quick question: I wonder how to display only particular discussion or dialog.
Let say I have sprite.. and on collision with this sprite I want to display discussion id=1
And then I have different sprite, so on collision with that sprite I want to display discussion id=2 etc..
Please give me advice how can I do this?
I usually would give them an instance variable then use the instance variable in the path. As per the discussion above I might change the system to using attributes/IDs instead of different tags but here is an example:
XML.StringValue("/content/"&Interactables.class&"/"&Interactables.name&"/message/text()")
So in this example Interactables is family (if you can't use family just make one object with different instances) an the class is either set to NPC or Sign, but works the same way, and the name is whatever name I give it. So my xml would be:
-content
--npc
---tom
----message Hello!
But planning on eliminating the tom tag and giving the npc tag an id of tom.
Magistross, I was going to ask if you can give an example of when you have used a for each xml node? I can't think how to implement it in any of my current situations.