dop2000's Forum Posts

  • It's impossible to read that code you posted. Can you share your project file or a screenshot of events?

  • DiegoM I discovered that when you try to create an instance with a non-existing template name, the default instance is created. I think the correct behavior here would be not create anything - similar to how nothing is created if you specify a non-existing layer name.

  • Ashley

    Templates may help to spawn the right tilemap instance, but there may be cases when this will not work.

    In my example, some scenes may not contain a tilemap. If I create a scene by template and then attempt to create a (non-existing) tilemap instance with the same template name, the default instance of the tilemap will be created. By the way, this seems like a bug, I think if the template doesn't exist, then the instance should not be created. Like when you try to create an object on a non-existing layer.

    Of course, it's possible to find workarounds, but they will require a lot more effort. It would be much easier if tilemaps supported hierarchy.

  • When using a variable like "menuIsOpen", or checking if the menu layer is visible, the important thing is to change this variable (or layer visibility) after a small delay. For example:

    Mouse On MenuCloseButton clicked 
    Layer "menu" is visible
    ... Wait 0
    ... Set layer "menu" invisible
    

    There is a new cool feature in Construct - interactive layers. When layer is not interactive, objects on it will not receive click events. But you still need to be careful not to enable layer interactivity setting in the same tick with the mouse click, if you don't want the same click to go through to that layer.

    Mouse On MenuCloseButton clicked 
    ... Wait 0
    ... Set layer "game" interactive True
    
  • I think you can only show Applovin ads in C3 via mediation. If you can't use Admob, the other two options are IronSource and Tapdaq.

    IronSource addons are part of the Construct Collection, I think you can get it cheaper on itch.io, or chat with the developer at constructcollection.com , he might offer you a discount.

    Tapdaq addons are only about $10, but I haven't used them and can't tell you anything about them.

    .

    EDIT: Looks like there is also a Cordova plugin available. It may be possible to implement it without the C3 addon, but this will be a difficult task - you'll have to call JS methods and build with Cordova CLI.

  • Cocoon Ads is a very old addon. If you send me the project, I can remove it for you. My email is here.

  • You do not have permission to view this post

  • That particular demo is not mine and it's a bit too advanced for this task.

    I would probably use Bullet behavior with gravity, there must be a simple math formula to calculate bullet speed to land at the particular spot.

    Another easy option is running two tweens - one to move horizontally, and the second one with "ping-pong" setting to move up and then down.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have two popular templates where random levels are built from "scenes", each scene contains a small tilemap and other objects.

    All scenes are currently stored on the main game layout, which is pretty messy. It would make sense to move all those scenes to a separate repository layout and use the new Templates feature to spawn them. But because tilemaps can't be added to the hierarchy, this is not possible.

  • I was wondering this too - why hierarchy is not supported for tilemaps? Ashley, could you explain?

  • Does this mean I can just connect them with hierachy in the layout view?

    Yes, in layout editor - you select one room/scene with all its objects, then right click on the room and add all objects as children.

    You can create hierarchies with code, but only if all objects exist on the current layout. Templates allow to spawn complex objects pre-built on other layouts.

  • You can use an inverted "Is Moving" condition + "Trigger Once".

    But if there are more than one instance of the object, then don't use "Trigger once".

  • Check out this demo:

    howtoconstructdemos.com/generate-random-levels-from-pre-built-scenes

    There is a free version and a video tutorial.

    The full version of this demo has an example of an endless runner where rooms/scenes are moved ahead of the player.

    There is also a new feature in C3 which was only added a couple weeks ago - templates. You can create rooms on a separate (unused) layout, connect all objects to the room with hierarchy, and give a template name to each room. Then you'll be able to spawn rooms by their names, with all objects in them.

  • Yeah, looks like the archive is damaged. You can try repairing it but the chances that the project will work after that are very slim.

  • When you see this error, press F12 and check last messages in the console log. They will tell you exactly what the problem is.