dop2000's Forum Posts

  • lionz I think OP is talking about the new actions which allow to delete animation frames in runtime.

    DreamingADream I don't think there is any easy solution. You can add empty frames and load images from URL into them, which means you have to import these images to your project Files folder.

  • You do not have permission to view this post

  • Turns out, you can't assign booleans to integers in JS. Try changing the code like this:

    localVars.debug=(runtime.objects.fSprite.getFirstPickedInstance().getAnimation("idle")==null?0:1);

    And the variable should be local. For global variables use:

    runtime.globalVars.varName

  • That's because the JS code picks the first instance in the entire scope. (which will always be the same in the loop)

    Since you are using For Each loop, you need to pick the family instance by UID. Right before the script, save fSprite.UID to another local variable - varUID. Update the script - instead of getFirstInstance() use getInstanceByUid(varUID)

  • I still struggle to understand what's what on your screenshot.

    Try this:

    dropbox.com/scl/fi/kjhcr6r9furktnme2e3kq/minimap.c3p

    If if doesn't help, please share a small demo project with an example of what the end result should look like.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can assign the result to a local or global variable. Then check that variable.

    localVars.varName=(runtime.objects.Sprite.getFirstInstance().getAnimation("a3")!=null);

    If the animation exists, varName should contain value 1. (but I haven't tried it)

  • Maybe I misunderstand the problem, but try moving the mask object on top of the tilemap+fog. Disable blend modes on tilemaps, and set blend mode on the mask object (I don't remember exactly which one, just try them all). Make sure to enable "force own texture" in layer properties.

  • You can use JS to check if an animation exists:

    console.log(runtime.objects.Sprite.getFirstInstance().getAnimation("a3")!=null);

    Another method is to try to play the new animation, and then check if it has changed or not. But it's messy and may not be suitable in some situations.

  • I tested with Xbox Bluetooth and an old Logitech wired controller.

  • I tested with two controllers and both characters are working fine. The movement of the bow on the right character is messed up, but it can still move and jump.

  • It's for any created instances - create by type, name, spawn.

    You can use "Wait 0" to wait to the end of the tick.

    You can pick newly created instances sooner than just the end of a tick. The next top level event is enough.

    Somehow this rarely works for me.. Logically speaking, a function is another top-level event, right? And yet if you call it after "create" action, it doesn't know about the newly created instance. I guess the first event should finish for the new instance to be available in other events, but this is not how I prefer to build my code.

  • Use "Wait 0.5*loopindex"

  • That's how Construct works - you have to wait until the end of the tick to pick newly created instances. Exceptions are: On Created trigger, Pick Last Created, Pick by UID

  • The file you shared has no download permission.

  • Looks like "On collision" is triggered separately for each instance.

    You can use "Is overlapping" instead, and "Pick nearest" as a second condition.

    Or try removing "for each" from the code on your screenshot.