mekonbekon's Forum Posts

  • I was wondering if anyone has been experiencing this issue:

    This started with the latest beta version (beta r249). My capx files are saved to a local folder that is backed up on Google Drive.

    Periodically, when attempting to resave a project I get the error message:

    "Error saving project 'myProject' - the project has NOT been saved to disk. We applogise for any loss of work. You may want to report this issue to Scirra.

    Message: Failed to move .capx.tmp to .capx!"

    When I check the save folder I can see: myProject.capx.tmp and myProject.capx.backup1, but myProject.capx has vanished!

    The .tmp file is ticked as saved on Drive but the .backup1 file is still marked as syncing.

    I can save the project file as a new name fine, but usually at some point this same problem will arise and I'll have to resave under a new filename.

    I have plenty of space on Drive so I don't think that would be causing a problem.

    It works fine if I save outside of the Drive folder, but ideally I'd like to be able to keep the current save location to ensure everything is automatically backed up.

    Any suggestions on what could be the problem? If this isn't an isolated incident I'll try and create a minimum reproducible and log it as a bug.

    Edit: I'm running Windows 10 on a PC

  • Search for "Parallax" in the tutorials section - lots of examples there.

    In a nutshell, you place background objects on different layers and then adjust the parallax values in the layer properties.

  • You might be able to use the system event "Compare two values" and then use:

    Audio.PlaybackTime(Tag)

    Get the current playback time in seconds of a sound with a tag. This starts at 0 and counts up to the duration, except for looping sounds which keep counting up past the duration.

    e.g.

    Compare two values: Audio.PlaybackTime("yourSound") > 2 |Trigger once : Your action

  • dop2000 , well at least Wossi won't need to ask why the sprite now only turns white!

  • Wossi

    I think it's because the color settings for SetColor range between 0-100, not 0-255. I've made the same mistake myself!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Would something like this work for you?:

    https://www.dropbox.com/s/t9btkztlopfsj ... .capx?dl=0

  • jatin1726:

    The regex defines what can and can't appear in the email address; this part:

    ^[A-Z0-9._%+-]+

    ...defines what characters can appear before the "@". The "@" ensures that there has to be an instance of the "@" symbol.

    This part defines what can appear after the "@":

    [A-Z0-9.-]+\.[A-Z]{2,}$

    Note that neither of these parts allow "@"

    This isn't the only regex that can validate emails. If you google "regex" and "email" you will find a whole bunch of other examples, some more thorough than others.

  • The capx I shared above demonstrates this as described. Here's the link again:

    https://www.dropbox.com/s/qw6a0rp9f5srf ... .capx?dl=0

    Type the email address into the text box, press enter. The text above the text box will change depending upon whether the email is valid or not.

  • sahesadega

    You can use something like this:

    https://www.dropbox.com/s/k6h7iu16nls7z ... .capx?dl=0

    The important bit is in function "AB":

    If (A=0 & B=1) show "TRUE", else if (A=1 & B=0) show "TRUE", else show "FALSE"

    At runtime click on the A and B values to toggle between 0 and 1

  • jatin1726

    In the demo I supplied the following shows as valid:

    ...and these all show as invalid:

    ex@mple@gmail.com

    example@gm@il.com

    ex@mple@gm@il.com

    example@@gmail.com

    Please can you supply an email address that is working incorrectly?

  • jatin1726 I'm not sure I understand. Do you mean that invalid email addresses with 2 "@" symbols are being marked as valid, or that emails with 2 "@" are not being allowed in the demo I supplied? Can you give me some written examples of some emails that aren't working correctly?

  • I would guess northern European, definitely not British (I'm a Brit). Sometimes it sounded a bit French, others Scandinavian. Am I close?

  • RobertoFreemano

    You can use the modulo (%) expression to achieve this:

    If score%10 = 0

    If score != 0 | play reward animation

    Modulo checks the remainder when you divide the number to the left of % by the number to the right.

    You need to check that the score isn't 0, as 0%10 = 0.

  • jatin1726

    You can use the "System|Test regex" condition to test the text in a text input box:

    String: TextBox.Text

    Regex: "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$"

    Flags: "gi"

    This should capture pretty much all email configs. Use an "else" statement beneath this condition for your invalid email actions.