WackyToaster's Forum Posts

  • Ah, good to know. That means I actually need to load the extra sprites at the start of layout B and can't "preload" it on layout A. That's fine too.

    Cheers

  • construct.net/en/make-games/manuals/construct-3/system-reference/system-actions

    If I load something into memory via one of these actions, does it ever get automatically unloaded or does it stay loaded indefinitely?

    E.g. I load a bunch of sprites on Layout A (during the transition to Layout B), then go to Layout B, are they also loaded on Layout B? And I guess similar, if I go from Layout B back to Layout A, do they get automatically unloaded (as usually that's what happens) or should I call the unload action?

    And yes I do need this because otherwise I'd load a handful of objects on the fly and that causes jank, especially on older devices.

  • Yes it's absolutely possible to make movement like this in Construct.

    You can check out dops example.

    Or check this one out I whipped up. Doing it with physics iirc has better performance but if you don't need many enemies at once (e.g. vampier survivors style), mine will do just fine.

    wackytoaster.at/parachute/encircle_enemies.c3p

  • For more complex stuff like this you could look into something like

    rsmbl.github.io/Resemble.js

    It even gives you the exact percentage of similarity.

    At the same time, the makeshift solution would be to

    1. Have both the input and output images on a canvas of the same size

    2. Loop over every pixel and compare the colors

    3. Track how many comparisons are true and you can do a little simple math to get the percentage of pixels that match

  • Instead of a function, I recommend using a custom action. It works almost identical to a function but the function doesn't pick an instance, so it just applies to all of them. The custom action only applies to whatever instance was picked. In your case, the Fam_Ducks which are being touched.

    Btw you also don't need every tick inside a function. It does nothing.

  • Be careful with trigger once because it has a tendency to f things up as soon as there's multiple instances.

    Your current solution isn't far off though, all you have to do is to invert your logic.

    Enemy has LOS -> Start timer lost

    (no need to stop the timer on LOS lost or anything)

    As long as the enemy has LOS, the timer will run indefinitely. When the enemy has lost the LOS, the timer will run out after 1 second and the enemy will move to the return point.

  • I use it often to figure out where the middle of the sprite is, but yeah it vanishes so I have to switch back and forth real quick to get it lol. I think an option to toggle visibility on-off would be great.

    Maybe file a feature request: github.com/Scirra/Construct-feature-requests/issues

  • Is it something you can take a screenshot of or is it just something you visually perceive when it’s moving?

    Try this, my screen also has some smearing but that has nothing to do with Construct.

  • I mean you don't have to necessarily tie it directly to the steam achivement? When you unlock the achivement, you also store anywhere (localstorage) that "player has X unlocked" and work from there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can get accelerometer information from the touch plugin. Remember that you need to request permission for that (action also in the touch plugin)

    construct.net/en/make-games/manuals/construct-3/plugin-reference/touch

  • Oh you should absolutely pay attention to them and templates too. These two features are insanely useful. I could never go back to not having them.

  • Yeah it works now.

    As for the project, honestly I can't tell what's going wrong.

    My suggestion would be to just make use of hierarchies though, see construct.net/en/make-games/manuals/construct-3/interface/layout-view That should cut down on some of the complexities you have going on.

    If you have your button and add the text object as a child (or as many other objects as you wish) all you need to do is tween the button, and all the children will scale accordingly. This also circumvents the issue that tweening the text object scale doesn't scale the font size.

  • It says I don't have access to the file, you have to make it public

  • My guess is that at some point you're accidentally overwriting the stored scale. It's impossible to tell from the code you posted though where/when it runs. Ideally you could upload your c3p file to a google drive or somewhere and post it here. You can strip out anything you don't want/need to show before.

  • My guess is that it should be getFirstPickedInstance()

    runtime.objects.turret.getFirstPickedInstance()