I have a irrlicht xml scene file where I have added my own section, however I can't seem to find a tutorial or anything of how to access this parts when the scene node is loaded.
Can someone please tell me how to do this or direct me to a tutorial that has this enclosed?
I'm trying to think my way through a similar problem. I think first you need a custom scene node that has a place to store your script data. It could be stored as a pointer to a loaded script file or as path and name to load a script file or as a formatted string containing the script (could use array of stings if you have multiple scripts). Then you need to load the data from the xml file into your node. Once a script is associated with your scene node you should be able to call any function from the script at will. To associate the scripts with their nodes we need to extend the xml handling. This part I am still trying to figure out. I know there are xsd files(xml schema definition) witch I think allow extending the xml handling. I don't know how to get irrlicht to use them but I heard it supports them. They should allow you to handle custom xml tags. If you figure this out I would like to know how to do it.
You seem to obviously be a lot further along with this then me!
Yes that sounds about right, I was going to either do it the way you suggested or just reference the node as a pointer through some other class that handles the scripts or some such.
Thanks for the advice, I will post anything useful that I discover, if you find anything please get back to me too!
Hoping I can do this with simply extending classes rather then having to compile my own irrlicht source, perhaps this is a feature that could be added in the future?
I found a cool way to handle xml . It is called XML data binding. Basicly you generate c++ structures for all types defined in your xsd. Then use something like tinybind to register the connection between the types your XML reader accepts and your structures. When you run your program and load an xml the binding library creates a tree like structure containing all the structures referenced in the XML file. You can then access the data by element name. For instance MyWindow.XML would be loaded as an object named MyWindow and an element named scripts would be accessed like MyWindow.scripts