dop2000's Forum Posts

  • Do you have 1000 room_x objects? This too should definitely be optmized.

    You can add all room_x sprites into a family and make a simple loop:

    For "x" from 1 to 1000
    System Pick By Evaluate: RoomFamily where RoomFamily.ObjectTypeName="Room_"&loopindex
    ...ArrayMap value at loopindex=1
    ......RoomFamily set frame to 0
    ...Else
    ......RoomFamily set frame to 1
    

    Another way to pick RoomFamily instance is by an instance variable - create a variable RoomNumber and assign a value to each room_x sprite.

  • Try installing the latest version of the addon from this post:

    construct.net/en/forum/construct-3/plugin-sdk-10/erens-ported-plugins-modules-159391

  • No, when you download an update to the same app, the localstorage data is preserved.

    But you need to be careful though to ensure that the data from previous versions is compatible with the new version of your game. For example, if you added a new key to be saved in localstorage, make sure that the game still works when this key is not available.

  • What do you mean by "creating dictionary in code"? You will have to set each dictionary key with an action on the event sheet. If you only need like 5 keys, I guess this solution is fine. But for 30 keys multiplied by 5 languages - that's too much code!

    I want to switch to this solution because it is easier to have every language in a seperate file...

    I actually did this in my first game and regretted it later. When there are a couple of hundreds strings in each file, it becomes really difficult to sync them, you need to make sure that the key names in each file are the same.

    I now prefer putting all translations into a single array.

  • Not sure I understand. When an enemy stands still, the knockback works. But when the enemy is moving, the knockback doesn't work. Is this correct?

    Maybe the MoveTo has priority over the 8direction behavior. Try changing their order in the list of behaviors:

    If this doesn't work, try disabling MoveTo for a brief moment when the arrow hits the enemy. Or maybe set its max speed to 0.

  • If most objects are off-screen and the game still slows down, then the problem is not with rendering them. You need to keep the object count reasonable, disable behaviors when they are not used, optimize collision checks etc.

    If the game is 2D, consider replacing blocks with a tilemap - it should be massively faster.

  • He's setting Y coordinate to random(170-387). The correct expression is random(170,387) - there should be a comma between two parameters.

  • You can "erase" a circle using a mask sprite with a blend mode. See the official "Blend Modes" example in Construct.

    It may be difficult though to organize objects on layers properly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you added an "original" somewhere, and decided to add it to a family at a later stage. Then which one becomes the original one for the settings for the things added to the family. Monkey wrench I tell ya.

    Yeah.. And when you add a new object to the family, it inherits the properties from one of the instances of one of the existing members, but you can never guess which one. It's a mess.

  • I simplified things in my explanation. The sprite was actually a family of about 50 sprites. And there were many hundreds of instances of them on layouts, all manually placed in the editor and configured. The game was "find an object and solve puzzles" type, so everything was heavily scripted. Objects behaved differently based on the values in their instance variables.

  • Actually, this is a mistake made by the author of the game template. You need to use Set Line to replace(Line,...) in the second and all consecutive actions:

  • 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.