jaytwining's Recent Forum Activity

  • Ok I'll try that out. TY Blackhornet

  • I have. You'll notice in the copied XML that there are double quotes, which is non-standard for XML. That means I have to manually edit the xml file every time I update it.

    [attachment=0:1ke3hsuf][/attachment:1ke3hsuf]

    for better viewing, here's the raw XML:

    "<?xml version=""1.0"" encoding=""utf-8""?>

    <Catalog>

    <Album artist=""The Last Shadow Puppets"" title=""The Age Of The Understatement"">

    <Track rating=""4"" length=""P3M7S"">The Age Of The Understatement</Track>

    <Track rating=""3"" length=""P2M18S"">Standing Next To Me</Track>

    <Track rating=""5"" length=""P2M26S"">Calm Like You</Track>

    <Track rating=""3"" length=""P3M38S"">Separate and Ever Deadly</Track>

    <Track rating=""2"" length=""P2M37S"">The Chamber</Track>

    <Track rating=""3"" length=""P2M44S"">Only The Truth</Track>

    </Album>

    <Album artist=""Kings Of Leon"" title=""Because Of The Times"">

    <Track rating=""4"" length=""P7M10S"">Knocked Up</Track>

    <Track rating=""2"" length=""P2M57S"">Charmer</Track>

    <Track rating=""3"" length=""P3M21S"">On Call</Track>

    <Track rating=""4"" length=""P3M09S"">McFearless</Track>

    <Track rating=""1"" length=""P3M59S"">Black Thumbnail</Track>

    </Album>

    </Catalog>"

  • Hey everyone!

    I've been looking at some of the XML parsing examples and either they don't work or have extensive hand editing. Below you'll find my construct 2 example and the example xml.

    Some notes:

    (1) the G_ENT_## are global variables as I'm moving my enemies through sets of arrays. The global variables help maintain the index values and are easy constant references.

    (2) when I run my program in debug mode, the XML data is sitting in the AJAX object.

    (3) Nothing ever gets written to the array arrNPCEnemies.

    (4) I'm using this site to test my xpath queries: http://www.freeformatter.com/xpath-test ... #ad-output

    (5) my xml file is appropriately added as a project file.

    [attachment=0:17dq3yc0]xml example.PNG[/attachment:17dq3yc0]

    [attachment=1:17dq3yc0]construct 2 example event sheet.PNG[/attachment:17dq3yc0]

  • Perfect! That solved the problem!

    Is there a tutorial or link that explains the different kinds of textbox types? All I could find when I was searching the forums was this: Thanks again Frag!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone!

    Working on a text game. I have 2 sprites fighting and I want to send the results to a textbox.

    Here's the function I'm using:

    newline &Self.Text &newline & Function.Param(0)

    Here is an example of my function call:

    "You use " &sprPlaChar.AttackName &" on " &sprNPC.Name &" for " &sprPlaChar.Damage &" damage " & newline

    What I'm seeing is that the text is just being added to the side and scrolls to the right forever. Basically the new lines are being ignored.

    Here is the textbox object [attachment=0:14ug3icb][/attachment:14ug3icb]

    Any help would be appreciated.

jaytwining's avatar

jaytwining

Member since 7 Jun, 2014

None one is following jaytwining yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies