jsutton's Forum Posts

  • A global variable will work anywhere in your project.

  • floor(int(textinput.text)) looked like you missed the last bracket ")" or I did, oops.

  • Imagine 9 pieces of grid paper placed in a 3x3 grid. Each piece of paper is a grid 300x400. Each piece of paper is actually a tilemap and they are all pinned to the center tilemap. If you drag the center tilemap off the screen there is a duplicate copy of the center tilemap (an "edge" tilemap) that is now on the screen (this makes for a continuously moveable map). On a touch end where you are not touching the center tilemap, the center tilemap is placed at the last touched "edge" tilemap location (the 8 "edge" tilemaps are still pinned and shift accordingly. This way you can scroll again and it will look seamless until you happen upon an "edge" tilemap.

    The problem, each tilemap is labelled 0-300x,0-400y. When the map shifts the tilemap.positiontotileX,Y shifts as well. Which means on one click the distance formula works, but on the next click it shifts and gives the inverse.

    I have no idea if any of this makes sense, but it's a huge pain.

    The only other solution I can think to use would be to pin small sprites to the map used for starting distance and then just use a distance(pin.x,pin.y,touch.x,touch.y) {divided by the actual tile size). It should work, but seems inefficient.

  • Change to a "text" vs a "number" and try the floor(int(textinput.text), it seems to work the smoothest.

  • If your end format is in a whole number:

    5645645.11

    "$"&RegexReplace(str(floor(Your_Number)), "(\d)(?=(\d{3})+$)", "g", "$&,")

    $5,645,645

    Pretty easy.

    If your end number needs cents:

    5645645.11

    Search the forums, I'm sure there's a way but I've never figured it out.

    $5,645,645.11

    No clue.

    If someone ever figures this out, a tutorial would be awesome.

  • If your animation is all correct, you might see if it's continually calling the animation when the button is pressed.

    (ie, a trigger once might be all you need.)

  • Menu, view, addon manager?...just trying to be helpful. Hopefully someone that has done this before will check-in soon. Also, you might try the unofficial discord, usually a few online.

  • Never purchased a template, so don't know too much. Template suggests it's a *.capx file? Can you just open it as a project? (maybe post a snip or 2, so we can see?)

  • Try pick all, if that doesn't work we'll need code.

  • Have you tried drag/drop the file into a layout?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The only way I would know to do what your asking is by using regular expressions.

    regexr.com

    That site allows you to see how the expressions work in realtime, which is nice for newbs like myself.

    Then

    for loop,

    action, RegexMatchAt(TextInput.Text,"\S+","g",loopindex)

    that would fill your array if there are space (you may want that differently, \S+ is just a not space parse.),

    then you could do a regexreplace for getting it into the math.pow format.

    I was curious why the .pow format? Set text to str((2^2)+(2^2)) displays 8.

    construct.net/en/tutorials/exploring-regex-construct-860/regexmatchat-3

  • Tilemap size = 100x100

    Variable1 = 1

    My question: is the variable tied only to the tilemap or is it tied to each frame?

    (Been messing with a loop for hours and coming to the conclusion it's only tied to the map itself.)

    As an example, I can get the frame by using touch.

    However setting them all automatically at the beginning of a layout doesn't work.

  • Diego is spot on, you could pop the array front (delete 1st, then display second, etc.)

    A couple other options:

    1. Destroy the first one when creating the new.

    2. Opacity lowered for old (or both).

    That's the nice part of programming, whatever you want is perfect.

    Just adding, recall the old super mario brothers. It spawned messages at point x,y then move up all the old with a fade. Was kinda neat.

  • 113000 out of 114600 and the random works in under 1 second still. Just an fyi (computers are really amazing).

  • When it fails, open the developer tools, is it tossing an error?