mindfaQ's Forum Posts

  • People still use screensavers? Invest your time into something more useful imo.

  • Families.

  • Without "g" in the flags, it looks for the first match of the regex expression and returns it as index 0. If you set any () (brackets), which magistross called capture groups, you can access them with 1, 2, 3, ... (contents of first bracket, second bracket and so on).

    With "g" you access all matches of the regex and can access them by index, BUT capture groups can't be accessed (because the index is already used for selecting the match itself (like what you want to happen)).

  • Right? I only thought of it when I halfway through, too.

  • Hard to do in spreadsheet form (at least for me)

    With a for loop it is pretty easy:

    http://www.r-fiddle.org/#/fiddle?id=1rZKXg8q&version=3

    Guess you can do it easily in Construct 2 as well with a similar construction <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Gold, put in the gold values for each level separated by comma (currently data for 10 levels is filled in), same for halving stuff.

    Halving Potions are assumed to be used instantly on pickup and it is also assumed that the player bought the maximum amount of potions until the level. It is assumed that after halving, the value is rounded up.

    Run.

  • RegexMatchAt("bu,si,tres","[^,]+","gi",0) -> bu

    RegexMatchAt("bu,si,tres","[^,]+","gi",1) -> si

    RegexMatchAt("bu,si,tres","[^,]+","gi",2) -> tres

  • want to destroy the oldest:

    for each fireball ordered by fireball.iid (ascending): destroy fireball, stop loop

    want to destroy the newest:

    for each fireball ordered by fireball.iid (descending): destroy fireball, stop loop

    But I guess it would be easier and make more sense to give them a timer or something and destroy them after a specific time or whatever, oh well.

  • Well there is a always on top setting for NW.js in general, I just don't know if it is possible to add this option with the exporting process of C2. You'd need to edit package.json, and I think C2 does write it but not let you edit it at any time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • http://www.howtogeek.com/196958/the-3-b ... n-windows/

    The autohotkey script works with project exported with NW.js.

  • I don't think so. From my experience z-order is only influenced when new objects enter the layer (through system -> create, or moving them from another layer to the layer in question)

  • https://en.wikipedia.org/wiki/Microsoft ... le_formats

    Try formatting your data into an xml spreadsheet that looks like the one on the site (just with your data and layout).

    How you could go about this?

    (I only have Libre Office, so I am using this):

    1) open LibreOffice Calc

    2) fill your Layout. The fields that should be filled with your data later on, you can fill with a unique placeholder. Let's say you use %sub1%, %sub2%, %sub3% and so on for different fields. Now you save that as Excel 2003 xml. You should see a format similar to the one on the linked webpage.

    3) Load the file contents into your construct 2 project. (add to project files, request the project file with ajax -> save the contents into a variable; or if you want to, you could also skip the adding of the file to the project files and copy the contents of the file from a text editor to a variable and be done with it; care: you'd need to replace all " to ' in the xml-file)

    4) Now to filling those values: use the replace function. Say your value for %sub1% is "foo" Then you would do: replace(filecontents, "%sub1%", "foo")

    5) use the Browser object and invoke download of a string, string = filecontents, mimetype = "application/xls", filename = "yourexcelfile.xls"

    done

    example:

    https://copy.com/v34AQljxsEd371u6

    Opening the contents from that file from another layout can be done with regex, but it will require knowledge of regex (the more complex the file is, the more difficult it will be).

    If it's the same project and you expect the person to open it on the same computer, maybe you could use local storage. Or you put your data into an array and save the array as json (browser string download again) as a second file for the user. This could be loaded very easily into another project through the load json expression.

  • Yes, indeed it is. Just bad topic title, really.

    You sadly can't spawn families by object name afaik, so using families for creating instances probably won't work, if you want to control what you spawn.

  • This is how Dota 2 does it:

    http://dota2.gamepedia.com/Pseudo-random_distribution

    Basically reduces streaks in both "directions" (spawning too fast or spawning nothing at all).

  • Kind of weird, since it works seamless for me in either category. Well, audio sometimes is weird, maybe we use different browsers and because of this notice different behaviors.

  • From what I remember Cocoon's Canvas+ added around 10MB to your projects.

    Cocoon.io only added around 6mb to my game size.

    Thanks, that sounds promising.