Xml Plugin - A bit desesperate...

0 favourites
  • 4 posts
From the Asset Store
Antisuspend Plugin for Construct 3 prevents the runtime from getting suspended.
  • Hello,

    I am posting this because i have a problem with the Xml plugin. Basically i have been able to load this xml (if you look at the picture the green rectangle get executed):

    <?xml version="1.0" encoding="UTF-8"?> <triggerdefinition name="Trigger Zone A" description="Trigger for the trigger zone A in the level testing_zone-1-1."> <conditions> <condition name="require_global_unset_flags" parameters="test" /> </conditions> <actions> <action name="set_global_flags" parameters="test" /> <action name="show_dialog" parameters="1" /> </actions> <elseactions> <elseaction name="set_global_flags" parameters="test2" /> </elseactions> </triggerdefinition>

    However, when i run the red rectangle part of code in the image it doesn'T work. I can't select the nodes... it should work since i am doing the exact same things than other places. Basically, its an XML objet that is part of a specific object TriggerZone. So when the TriggerZone get created it create an XmlObject which load the trigger data so i can parse it anytime.

    Anything wrong or any ideas what would be the problem ?

    Thanks!

  • Found it... Xml encodage problem.. it should be an UTF-8 (without BOM) Dunno what this ? just UTF-8 doesn't work.

  • Oh, BOM is a small tag that gets added to UTF-8 files, marking them as UTF-8. It's invisible in normal text editors, you can only see it if you open the file with a hex editor.

    Must have been quite hard to catch that problem!

    To fix it, open the file in notepad++ and go to encoding -> encode in UTF-8 without BOM, then save the file.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yeah thanks for the tips! That what i did. But as you said it was quite hard to catch. The problem come from the fact that the XML was produced from a C# program i did. While saving i forgot to specify the right encoding. But Construct 2 won't tell you it couldn't parse it throught so we have to be careful!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)