Magistross's Recent Forum Activity

  • Very clever way of doing things. However, it doesn't seem to be doing exactly what spongehammer wanted.

  • Here's a more "programmer" way of doing such circuits. Might be a little bit too complicated though...

    https://dl.dropboxusercontent.com/u/7004246/circuit.capx

    First time doing recursivity in C2... and man was that a pain ! <img src="smileys/smiley36.gif" border="0" align="middle">

  • Is there any way ? "stop loop" doesn't seem to work for the "for each element" condition of the array object. Is that a bug ?

  • There are other ways to do such comparisons. Here, I modified Joannesalfa capx to show the use of the logical OR operator (the |), and an alternative method using a function.

    OR blocks are definately easier to read... although I hate the fact that you can't combine AND and OR in a single block.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A simple fix for that would be to disable the scroll to behavior of the hidden object.

  • I think I might know what your problem is. The For Each XY element will always loop through Depth-0 only. Are you expecting that both "levels" get created at the same time ?

  • Create two distinct events. One for the keyboard, one for the Gamepad. In the gamepad event, add a "trigger once while true" condition (found under the System condition)

    The keyboard event is already a trigger, so no need for that second condition there.

  • It all depends on how you access your array when you create your levels. Could you detail a bit on what you are currently doing and what or how it goes wrong ?

  • philzeleski

    Sorry for the late response, you should the "@username" trick so your correspondence know they have a message waiting for them ! <img src="smileys/smiley2.gif" border="0" align="middle" />

    The XPath that qualifies the first power's name is actually this : "/rows/row[1]/PowerName"

    You should rename your "rows" tag to "powers" and "row" tag to "power", it'd make more sense that way ! <img src="smileys/smiley2.gif" border="0" align="middle" />

    Now for your second question, simply set the text to :

    "Requirements: " & XML.StringValue("/rows/row[1]/PowerName")

    rob

    I don't understand what you actually want. Could you explain it a bit more ?

  • You could also use "Insert at Array.CurX + 1" to get the newly added value picked next in the for each.

  • I just tested it and it does indeed seem that you can do it. But you must do a push back if you want the new value to be selected by the for each, otherwise the same value get picked twice.

  • First of all, your XML contains error. Some characters cannot be used in tag names. Minus and plus signs are a no go, and so are spaces.

    Second, you'll have to get familiar with XPath expressions if you want to be able to fetch whatever data you want.

    I've prepared a small example for you using your XML data. It displays the description for the selected power. You should be able to build upon it. Happy learning !

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies