dop2000's Forum Posts

  • lennaert My question was how to find such instance in a large existing project, which may not have a dedicated layout for storing default instances. And even it does, not all objects may be there. And even if they are, the default instance may change suddenly if you change the order of layouts.

    I was working on a big game last year and there was a very important sprite with lots of instance variables and behaviors, which was used on many layouts.

    I intentionally put the first instance of it on a separate layout and filled in all the default properties. For example, I put these default values: variable isActivated=0, MoveTo Speed=500

    That was working for a while but then broke. Some other instance of this sprite became the default one. So when this sprite was added in layout editor it was created with these values: variable isActivated=1, MoveTo Speed=200 I had to manually edit them and about a dozen other parameters, which was super annoying. And I couldn't find the instance which had become the default one..

  • You need to watch/read some beginner tutorials, it's clear that you don't quite understand how events work in Construct.

    There is a function called FormatDialogue in your project. It prepares a line of dialogue before it's displayed by replacing some tags in the text. You can use this function to replace the tags you added. Just add another action to it (before "Set Return Value")

    For example:

    Set Line to replace(ReplaceString,"INTERACTNAME", interactNameVariable)

  • If you have many maps like that, you can probably create a system which will paste the map sprite on a canvas, read canvas pixels to detect transparent areas and build a tilemap automatically. But this will be a difficult task.

    For one map I would just create a tilemap by hand.

  • Isnt that what the new template function is for ?

    It is, but this feature is more like a workaround than a solution. It's not feasible to set up templates for all objects in the project and it may still be necessary to find the default object instance.

    Besides, templates are only for runtime. The default instance is used as a reference when you create an instance both in runtime and in the editor.

  • Each layout will have its own instance with IID 0, and it won't necessarily be the default one. I'm talking about locating it in the project.

  • Did you see the project I posted here? You can use the typewriter there, just do all the "replace" actions first.

  • You mean Java Archive JAR? It's a binary format, how are you planning to prepare it?

    You can easily save text data - just use "NWJS Write text to file" action.

  • Thanks, R0J0hound! I'll use your advice:

    So it seems a good solution would be to create a layout, put one instance of every object, and move that layout to the top of the layout list.

    It still sucks that there's no easy way to find the current default instance. In a big project I often waste a lot of time looking for it.

    Another similar problem is finding the layout where a global layer is defined. Why do I have to open every single layout and check if the layer is overridden there or not?

  • I've been using Construct for many years, but still don't know the answer to this seemingly simple question - if I have lots of instances of the same object on many layouts, how do I find which instance is the default? I mean the instance which is used as a reference when a new instance is created.

    Tagged:

  • It's not possible to delete a saved game. (you can only clear browser data)

    To test your code you can use a non-existing save name.

  • Yeah, a screenshot of the events would definitely help, because I don't understand what exactly the problem is. Or even better if you could share your project file.

  • What information do you want to save?

  • Posted an idea on the Suggestions platform:

    construct3-21h2.ideas.aha.io/ideas/C321H2-I-283

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We've asked Ashley about this just a few days ago:

    construct.net/en/forum/construct-3/how-do-i-8/create-hierarchy-tilemap-in-168930

  • Use "Write" actions of the NWJS object.