mindfaQ's Recent Forum Activity

  • That's pretty much what the functions do. But don't set it to 0, instead substract 50, again for accuracy.

  • For this you don't even need regex necessarily.

    replace(srctxt, " ", "")

    and if you wanna find out the length without spaces:

    len(replace(srctxt, " ", ""))

    Of course regex has it's advantage. It can also catch other whitespace characters in one go and replace them for you etc, like Ramones showed.

  • RamPackWobble:

    If the score skips from 49 to 51, this will not work.

    Instead I'd go for something like:

    function "addscore":

    • add to score: f.param(0)
    • add to scorespawner: f.param(0)
    • call function "scorespawn"

    function "scorespawn":

    while scorespawner >= 50:

    • create object
    • substract from scorespawner: 50

    All actions that add score would then use the addscore function instead of simply adding x to score.

  • Do whatever you wish with it. I wouldn't mind if you point me towards the result of your work, if you chose to use it, to take a look - but it's not a requirement ^^.

    You can see that there is still a lot that can be improved and added as I listed and the code is sometimes written a bit not-so-logical to enable me using less events, but other than that it should be usable.

  • this would work:

  • Don't think LaTeX is supported. One might be able to write a plugin using MathJax (I don't know) that enables it, but that's probably complicated.

  • I would not use "Every tick: something.Y+1", it will heavily depend on frame rate and if your game runs at 30 fps for one player and 60 fps for the other, it is 100% faster for the second player compared to the first player.

  • I take it that you are using a single door object and single button object for all four from the way you wrote it. If that's the case, there is a simple way of doing it. Every object will have a UID, it helps you identify every single object in the game, even if they are clones from the same object. When you select each individual object, notice that on the right properties layout, there will be a UID section which gives you their number. So all you need is to use this to achieve what you want.

    Player is overlapping button: Set variable1 to button.UID

    Variable is (17 example)

    Sub event:

    Pick Door with UID 20, (Let's say that 20 is the UID of the door you want button17 to open.)

    Place your actions here to open the door.

    But why would you use UIDs for that instead of adding an instance variable that works as identifier and makes your code a lot more readable, when you name your doors with some kind of logic.

  • It's not browser specific, but kind of your decision, if you want to leave the bug in Construct 2.

  • It happens in all tested browsers (Firefox, IE, Opera), so very likely in Chrome, too. I won't install Chrome, but the youtube video shows pretty easily how to reproduce the bug (= you only need to know how to set the zoom level of your browser). Delete the screenshotting if it annoys you. I only added it so one could easily measure out the proportions/sizes of the boxes in an image editor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Of course like always with regex the necessary complexity depends on the data you can expect / want to work with.

    If the string always looks like "Hi my name is [myname].", a simple RegexMatchAt(AdvancedTextBox.Text,"Hi my name is [(.+)\]\.","i",1) or even RegexMatchAt(AdvancedTextBox.Text,"[(.+)\]\","i",1) will work.

    If you expect multiple [] in the text and you want to match them all plus wanna filter out newlines, it could look like this:

    https://copy.com/rITBhCmSQaOU7RCN

  • I won't post a capx, it's a basic system expression - go through the very basic tutorials, if you don't know how to use those.

mindfaQ's avatar

mindfaQ

Member since 12 Oct, 2013

None one is following mindfaQ yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies