dop2000's Forum Posts

  • "On Enter Pressed" still works for me when cursor is in a text input.

    To stop the Tab key to move focus to another text input you can try this code, but it only works with Worker disabled:

  • Here is a solution (not mine) using a bit of JS:

    dropbox.com/scl/fi/nxybw8fjiob5qjurzmg5l/sort_different_object_type.c3p

    Be aware that it may work slower than the system "Sort Z order" action.

  • lilOptionz You don't need to pick instances inside the "For Each" loop. Like I said, this loop processes one instance at a time, so the instance is already picked! Just use "Compare Two Numbers loopindex=0" condition.

    Your events where you are trying to pick players by comparing loopindex make no sense. Also, expressions like loopindex(1)&loopindex(2) are totally wrong, loopindex doesn't take numerical argument.

    And as lionz mentioned, you shouldn't run this code on every tick, make sure it's executed once when needed, for example when a layout with scores is opened.

    Try changing the code like this:

  • Have you checked memory usage in the Task Manager? It may be a memory leak, I've seen this before, here is an example:

    github.com/Scirra/Construct-bugs/issues/5503

  • Loading images into sprites makes sense for large static graphics, like big backgrounds. If you are planning to load images for all sprites in the game (especially animated), this is going to be a very difficult task.

    I also suggest re-compressing your graphics with PNGQuant after export. It may reduce the size of your exported game by 20-40%.

    I usually disable the built-in image compression when exporting, and then run a batch file which compresses all PNG files in the Images folder. PNGquant is technically lossy, but the image quality is practically the same, no one will be able to tell the difference.

  • Yeah, sometimes it's better to use separate events for each trigger, rather than a single OR-block. If they should run the same code, move it to a function, and call this function from each trigger.

  • The shuffle should choose 25 of the 50 total objects and create them on the corresponding image points.

    If the objects are already on the layout, you don't need Advanced Random for that. You can do something like this:

    Repeat 25 times
    Sprite isPlaced=0
    Pick Random Sprite instance
    .. Sprite set position to ...
    .. Sprite set isPlaced to 1
    
  • Yes. Add to a family, check for overlapping at offset.

  • You can format your data as a list of comma-separated values. And save it as a text file with .CSV extention. Excel will open this file.

    I found an example:

  • Did you try when the building is overlapping the player change building opacity with trigger once?

    I don't recommend using "trigger once" here! It won't work correctly with multiple instances.

    Here is a very simple implementation:

    + System: Every tick
    -> Building: Set opacity to 100
    ----+ Player: Is overlapping Building
    -----> Building: Set opacity to 20
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • System condition you are using in the last subevent to compare SlotNumber doesn't pick InvSlot instances. You need to use "InvSlot Compare Instance Variable" condition for picking. You might also need to add "System Pick All" in front of it.

    Stuff on dropped
    Stuff is not overlapping InvSlot
    ... System Pick All InvSlot
    ... InvSlot Compare Instance Variable SlotNumber=Stuff.SlotNumber
    

    Edit: I did a quick test and "Pick all" is not required.

  • Checking for "Overlapping at offset" should still work here. Just set the right X and Y offset for every arrow direction.

    And if you need to check for collision between two instances of the same sprite object, you will have to add it to a family:

    Sprite is overlapping SpriteFamily at offset X:20 Y:0

  • I'm not sure I understand your question, please post a demo project file or some pictures.

  • There is an action you can use - "Sprite Is Overlapping at offset". For example, if you want to check if it will collide with another object 20 pixels to the right, use X offset 20.