mindfaQ's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • RegexMatchAt(yourstring,"Hi my name is [(\w+)\]\.","i",1) (only works when it's one word, no spaces)

    RegexMatchAt(yourstring,"Hi my name is [([\w ]+)\]\.","i",1) (spaces are allowed)

    RegexMatchAt(yourstring,"Hi my name is [(.+)\]\.","i",1) (any characters are allowed, must be at least one character)

    one of these should do the job, depending on what you need

  • Most of the size will come from images and audio + since you have to include some browser engine stuff into your apk to run your html 5 game, you need to add roughly 20 MB. So a rough estimation would be:

    Size of you game exported to html 5 + 20 MB, I think.

  • you could also do a:

    for each sprite (ordered by sprite.x, ascending): set lowestx to sprite.x; stop loop

    for each sprite (ordered by sprite.x, descending): set highestx to sprite.x; stop loop

    etc.

    set scrollx to (highestx+lowestx)/2

    set scrolly to (highesty+lowesty)/2

    and calculate the zoom according to your aspect ratio etc.

  • Like this it works (the wait introduces a wait time of 1 frame after freeze until the touch gets unlocked again, means clicks during the freeze will have had no effect)

    I'd still suggest writing the code in a way that doesn't freeze up your game.

  • Normally they are, if you have no wait actions etc in them.

  • var = 1

    some event:

    var = 1

    call function

    on function:

    do stuff

    var = 0

    var = 0

    trigger once:

    set text: "the function has finished"

    (or use wait for signal and signal)