Custom nodes after a new scene is loaded

  • Hi!

    So I'm trying to store some additional data in my <scene> tags, custom xml nodes, can be anything really.

    However, I thought when I'd load a new scene that also has such a node, the contents would be overwritten. Instead, it stays the same.

    Anyone has any experience with this? Is there a way to define such custom data within a scene, and get it overwritten when a new scene is loaded?

    Thx!

  • for simple stuff you can just use an attribute in the scene element :
    <scene name="a" custom="100" /> ... </scene>
    <scene name="a" custom="200" /> ... </scene>
    <events name="check" onnewscene="trace(scene[get(xml.scene)].custom);" keep="true" />

    but nodes should work, too?
    maybe show a simple xml example

  • Hi!

    Thanks for the tip, like I said we needed nodes as attributes weren't complex enough for our needs. Like I said, deleting the nodes when a new scene is loaded works fine, I was just curious if there was a better solution, but I haven't found one yet

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!