dop2000's Forum Posts

  • Your question is why the animation is paused on the first frame? Try changing the actions to play animations from the current frame (not from the beginning).

  • I work in Construct on two computers with different specs, but only on one at a time, obviously.

    I also often need to switch between the stable and beta releases of Construct. And sometimes I need to test my projects in another browser like Firefox.

    The problem is that Construct logs me out constantly. Seems like it only allows two, or maybe three login sessions. So I get logged out and have to re-enter my login details many times every day.

    Ashley Is there any way to fix this? I understand that you probably want to prevent people sharing accounts, but can one login session be at least used by all C3 versions in the same browser?

  • Make sure to enable "Force own texture" on the layer.

  • It's really difficult to understand the issue without an example. Can you share a small demo project?

  • My main concern is that construct is not a robust text editor.

    I agree, it's not. It has got much better since early versions, but still nowhere near the convenience of Excel or Google Sheets.

    If I need to add a lot of strings to the array at once, I usually prepare them in Excel and then copy over to the construct array.

  • Glad it worked!

    To make the code even shorted you can use ternary operator

    For each Room 
    ..Room set frame to (ArrayMap.at(Room.RoomNumber)=0 ? 7 : ArrayMap.at(Room.RoomNumber))
    

    This means - if the value in ArrayMap.at(Room.RoomNumber) is 0, then set frame 7, otherwise set frame to the value in the array.

  • Since you are loading/populating the dictionary only once at the start of the game, you should not worry about the performance.

    Anyway, the array thing seems good but I have already implemented the dictonary in my game on which I am working on since 2019 and it would be a pain to switch to that.

    Yeah, I also prefer working with a dictionary. But the array is much easier to manage, especially when you have many hundreds or even thousands of translations in the game. I have a template in the Asset Store which converts that 3D array into a single dictionary, extracting only the strings for the current language.

  • You can also run a loop for instances:

    For Each RoomFamily
    ...ArrayMap value at (RoomFamily.RoomNumber)=1
    ......RoomFamily set frame to 0
    ...Else
    ......RoomFamily set frame to 1
    
  • 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 Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.