Magistross's Forum Posts

  • Are you adding a one pixel border on all four sides ? You might try to limit yourself to only two if so.

  • I checked your CAPX. I noticed the number you want to format has a floating point. My Regex assume you don't. The "FormatCurrency" Regex assume there is a floating point. So you might have to combine both in a function and use the appropriate Regex. Be sure to pass the value as a string to the regex, otherwise it might behave strangely. You can do that by appending an empty string to the variable (implicit conversion), or using the str() function (explicit conversion).

    Here's the modified CAPX.

    tomhaiger You might want to read a bit on "regular expressions" in general, especially the Javascript variant, which lacks the lookbehind functionnalities. It's quite a powerful feature for matching and replacing strings.

  • Funny thing is "LetterBox Scale" seems bugged too, there's a small gap of 2 pixels on the right, and the text box shows "width : 1278, height 720"... so it skews the output ever so lightly.

  • Using AJAX and CSV you can do just that.

    Take a look at this thread :

    It features plugins that should make your life easier !

  • You can also do it in one line using RegexReplace expression (aka, voodoo magic).

    RegexReplace(scoreVar, "\d(?=(\d{3})+$)", "g", "$&,")[/code:3gom10ma]
  • Problem Description

    There seem to be a weird behavior of the scaling while using "letterbox integer scale" when you export to Universal Windows 8.1 App, and run it on a phone. I tested both on an actual device and phone emulators.

    Note : It scales perfectly using the desktop version of Windows 8.1

    Attach a Capx

    https://dl.dropboxusercontent.com/u/700 ... aling.capx

    Description of Capx

    The attached capx as a window size of 640x360. Which is supposed to "integer scale" up to 1280x720 on both 720p and WXGA devices, and to 1920x1080 on 1080p devices. However, as you launch the app on said device, you'll notice the window size isn't scaling correctly at all. There's is a "debug" text object that get its text set to the current window size. What is weird is the fact that the canvas is definitely scaling, but absolutely not by an integer ratio (hence the bug).

    Steps to Reproduce Bug

    Open .capx

    Export to Universal Windows 8.1+

    Run on a 720p, WXGA or 1080p device/emulator

    Observed Result

    The window size is not a multiple of 640x360.

    Expected Result

    A window size of 640x360, 1280x720, 1920x1080, etc., depending on the device used.

    Affected Browsers

    Browsers unaffected, everything works as intended.

    Problem in a wrapped WP8.1 app.

    Works fine when launched as a Window 8.1 App

    Operating System and Service Pack

    Windows 8.1 FR

    Construct 2 Version ID

    Release 173

  • Ok, once I get back from work I'll make a new bug report with a capx more suited for this. In the meantime, anyone knows if HTML5 apps under Windows Phone have any kind of system bar ? There doesn't seem to be any.

  • Problem Description

    There seem to be a weird behavior of the scaling while using "letterbox integer scale" when you export to Universal Windows 8.1 App, and run it on a phone. I tested both on an actual device and phone emulators.

    Attach a Capx

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

    Description of Capx

    The attached capx as a window size of 640x360. Which is supposed to "integer scale" up to 1280x720 on both 720p and WXGA devices, and to 1920x1080 on 1080p devices. However, as you launch the app on said device, you'll notice the window size isn't scaling correctly at all. There's is a "debug" text object that get its text set to the current window size. What is weird is the fact that the canvas is definitely scaling, but absolutely not by an integer ratio.

    Steps to Reproduce Bug

    • Open .capx
    • Export to Universal Windows 8.1+
    • Run on a 720p, WXGA or 1080p device/emulator

    Observed Result

    The window size is not a multiple of 640x360.

    Expected Result

    A window size of 640x360, 1280x720, 1920x1080, etc., depending on the device used.

    Affected Browsers

    • Browsers unaffected, everything works as intended.
    • Problem in a wrapped WP8.1 app.

    Operating System and Service Pack

    Windows 8.1 FR

    Construct 2 Version ID

    Beta release 172

  • A quick way to do that would be to replace the condition of the event that advance the text to a function trigger. Your timer would then simply call that function. After, you could add any kind of alternate event that would call the same function, something like "On space bar pressed" and the likes. It's important to reset your timer at the call of the function, so that your "auto next page" timer doesn't skip a newly displayed text.

  • Don't forget newlines, It's only one statement per line in VBScript.

    "Set WshShell = CreateObject(""WScript.Shell"") & newline &
    "WshShell.Run ""bat.bat"", 0" & newline &
    "Set WshShell = nothing"[/code:8ivcu8c7]
  • There is a also a special condition to do exactly that. It turns a normal event into a triggered event. Check it out in the manual. It's called "Trigger once while true".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use the array index to dictate the position.

    Supposing your array goes something like this :

    (ItemID, ItemQuantity),

    (ItemID, ItemQuantity),

    (ItemID, ItemQuantity),

    ...

    Using an expression like Array.At(0,0) would give you the ItemID of the first item slot, and Array.At(1,0) its quantity.

    Or you could use dictionnaries, and use keys that goes like "slot1_ID", "slot1_qty", "slot2_ID", "slot2_qty", etc.

  • Basically, what it boils down to is how to represent your items. Usually, items are a collection of values look like this {ItemID: 1, ItemName: "Small life potion", ItemPower: 25...}. Once you have your "database" of item, you can then create lists of item IDs, that could represent your inventory or chests content.

  • You need a basic "for loop", with the starting and ending indexes set to something like 10 and 15. Then you create your monster instances, and set there variables using the Array.At expression. (Array.At(loopindex, 0), Array.At(loopindex, 1), Array.At(loopindex, 2), etc.)

  • Be wary of the "else" condition, it resets any picking done in the previous condition. Also, if any picking is done on line 25, the "else" at 26 will never fire. The same also applies for lines 27-28. It might not be the behavior you expected.

    En bref, fais attention à toute utilisation de la condition "else" ! Parfois il vaut mieux créer une condition inverse que d'utiliser un "else" !