oosyrag's Forum Posts

  • What's your question? How to use local files without nwjs? Use the file system plugin.

    Or are you asking how to export a windows executable?

  • Fire the grappling hook object as a bullet. On collision with terrain have it stop and set a variable to grapple state and run your grapple events when that state is true.

    Otherwise, destroy with timer and/or destroy outside of layout/viewport to cancel it if no target is hit.

  • You do not have permission to view this post

  • Pretty frustrating, but if I had to tackle it I would probably do some combination of organizing layers functionally to those that will be the same on all layouts and those that will not, to take advantage of global layers. Then I'd aim to set as much of the variable layer properties and do as much of the object arrangement and placement by events to use an event sheet include, which can be edited once project wide, and also overridden by local events when necessary.

  • I've never used animate before, but I would guess you are looking for the set layer or layout scale system actions for zooming.

  • Nah, same issue can happen depending on the arrangement of the overlapping and order they are checked. I've already got the equivalent by disabling collision immediately.

    The solution is to keep track of and destroy the instance with the most number of overlapping instances on each iteration. In my previous example, A and C have 1 overlap, and B has 2, which means B should be the one to be destroyed given a choice.

    However, there's no way to get that count without using the old object -> compare with family trick as far as I can tell, by using system instance picking only. When using for each (because we want to count how many are overlapping each individual instance), to get the other instances, picking needs to be reset with pick all, and upon picking all, the isolation of the instance we are trying to check is lost.

  • Was staring at it some more, and realized that there are some suspiciously large open areas I would have expected to have sprites remaining in.

    I think it has to do with order - a bunch of sprites overlapping in a chain across the entire screen has the potential to all end up deleting each other with only one remaining at the end, even if there was space to leave many of them without overlapping.

    For example, if A overlaps with B and B overlaps with C while C does not overlap with A - If B gets deleted in the first round, A and C will remain. But when comparing A and B and A gets deleted, B is still overlapping C and another one will be deleted leaving only one at the end.

    I don't have a clean way of resolving this off the top of my head... but my suggestion would be to not use such a method of distribution in the first place - brute force spamming instances everywhere and then cleaning up afterwards is less efficient than not placing the instance if the target location would result in overlapping with an existing instance to begin with.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah. I'm gonna guess you've got a picking issue when using For Each, since that picks individual sprites from the start, which I think might preclude it from colliding with other sprites. (This should still work fine with the families method though)

    Try using While instead - dropbox.com/scl/fi/e7t25x743f0esab3wcm3m/objectselfcollisionsexample2.c3p

    (Edit: Something is still wrong with this for now... there are sometimes overlapping sprites remaining and I'm not sure why.) Edit 2: Solved - bound to layout was moving things after the start of layout trigger, allowing things to overlap afterwards. This can be resolved by either disabling bound to layout (which I did in the updated example), or by removing the start of layout trigger so it checks every tick for overlap (thus catching the moved objects on the second tick after start of layout).

  • dropbox.com/scl/fi/z09ckm4w7a2jsb8emsw5u/objectselfcollisionsexample.c3p

    This destroys both of them on collision (overlapping works the same). You can enable the random instance condition to only destroy one randomly. You can otherwise define how you want to pick which one gets destroyed via the available system pick instances group of conditions if you want.

  • The press kit has guidelines on logo usage.

  • Read the manual, do the beginner tutorials.

    Pick a simple/classic arcade game and try to copy it.

  • I already tried that and it worked. The problem is that I don't know how to detect how many squares an object needs and whether it fits when there's an edge or not enough space; in other words, how to calculate the surrounding squares.

    You don't need to detect how many squares an object needs, you should define the width and height ahead of time for the object, and use those values to check available space.

    For your inventory array, cells outside the array bounds are always 0. So for empty spaces inside your array, use something like -1 while filled spaces could be set to 1. Then when checking array coordinates based on the width and height of whatever you're trying to fit, you'll be able to see if each target space an empty space (-1), filled space (1), or out of bounds (0). Only allow placement/confirmation if all checked spaces are empty.

  • You do not have permission to view this post

  • "How to save the game when the host leaves" is decidedly different than "How to set up host migration to continue playing if the host disconnects". For the second, see above.

    In case you were asking the first, the answer is to have the host save as you would set up any other save system, which is up to you to determine what to save, where to save it, and when it happens. Generally you would use a combination of saving when the host decides to exit, and saving at set intervals in the event the host gets disconnected or otherwise terminates unexpectedly.