dop2000's Forum Posts

  • Do you see that images only use 100 MB in the debugger? That's very modest memory usage, it should not crash a phone with 4GB of RAM. The issue must be with something else. Try collecting LogCat logs.

    If you need all cards (20 animations with 180 frames each) to be available on the same layout, then you’re right: splitting them into separate sprites won’t help.

    The only real option (if the art style allows it) is to break each card into smaller pieces — for example, a shared border/background sprite used by all cards, plus a smaller unique image for each card.

  • Each animation contains 100-200 frames, and these are the same 105x131 images.

    Just to clarify - the size is the same, but the images are different in each animation, right?

    A quick test shows that 1000 frames with that resolution use about 80-85 MB in memory. So your game should probably run fine, even on mobile. But I would try to reduce the number of frames in animations, 200 frames feels like a lot.

  • Add a Priority instance variable to the family, say, from 1 (lowest) to 5 (highest). Then you can use the Pick lowest condition:

    For each Enemy
    Enemy has LineOfSight to Object
    Object pick instance with lowest (distance(Object.x, Object.y, Enemy.X, Enemy.Y)/Object.Priority)
    ... Enemy Move to Object
    

    Say, object A has priority 2 and is 100px away, object B has priority 5 and is 300px away. Object A will be picked.

    You can tweak the formula if needed.

  • The easiest solution is to store the puzzle number in a variable. Then, to move to the next layout use "Go to layout by name" action:

    Add 1 to puzzleNumber
    Go to layout "Z1-P"&puzzleNumber
    

    Alternatively, you can extract the current puzzle number from the current layout name:

    Set puzzleNumber to int(tokenat(LayoutName, 1, "P"))
    Go to layout "Z1-P"&(puzzleNumber+1)
    

    To avoid duplicating this logic in every layout, use a shared event sheet for all layouts, or place it in a separate sheet and include it in each layout’s event sheet.

  • First of all - never use "Trigger once" condition with objects that have multiple instances.

    You need to make sure that your ghosts can actually find a path. The easiest way is to add some visual feedback. For example:

    Ghost On path found → Ghost set opacity to 100
    Ghost On failed to find path → Ghost set opacity to 30
    

    If you see that them turning semi-transparent, try tweaking the pathfinding settings, such as cell size or padding.

    Once you fix that problem, I suggest you use MoveTo behavior for movement, it's more accurate. And it has "Move along pathfinding path" action.

  • Yeah, the Timer behavior would be the best option. The code is very simple - in event 23 start the timer, and add another (top-level) event:

    Enemy On timer set weakened to false

    In the future avoid using "Wait" action in events which can run on every tick - this will always cause troubles.

  • Move these two actions into event 23:

    Wait 4 seconds
    LargeE Set Weakened to false
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would also use Pathfinding+MoveTo. MoveTo is a lot easier to deal with than TileMovement.

    Configure the pathfinding grid correctly, disable acceleration/deceleration in MoveTo. Find path, move to the first node on the path. On arrived - move to the second node and so on. You can use tilemap expressions like SnapX/SnapY to find the exact center of the destination tile.

  • People probably just don't like AI-generated stuff.

    It will be interesting to see how you approach it. I'd probably use invisible sprites for each comic frame, then move the camera between them and scale the layout to match the sprite size.

  • I barely ever see Animate mentioned on the forums or Discord. I wonder how many people are actually using it.

  • A simple way to exclude destroyed instances is to change one of their properties. For example, you can make them invisible or disable their collisions.

  • but pick by uid isn't relevant to my project

    Why isn't it relevant? You can pass the text.UID to the function as a parameter and then pick the text instance by UID inside the function - this is a very common approach, which works for newly created instances.

    Another option is to use a custom action.

  • This is a known quirk in Construct: instances created in one event aren’t available to other events until that event finishes. The same applies to destroyed instances.

    There are several workarounds — the most common ones are using Wait 0 or picking newly created instances by UID. Wait 0 works because it delays execution until the end of the current tick.

  • Is the correct solution to set Project → Viewport fit = Cover (instead of Auto) to avoid letterboxing entirely?

    No, the Viewport fit setting only controls whether the viewport extends into areas like the camera notch cutout on mobile devices.

    What you need instead is "Fullscreen mode" setting - set it to either Scale inner or Scale outer. That way the game will fill the entire screen, and you’ll be able to resize your background sprite accordingly.

    construct.net/en/tutorials/supporting-multiple-screen-17