dop2000's Forum Posts

  • LS location on Windows should be this:

    C:\Users\USERNAME\AppData\Local\game_name\User Data\Default\IndexedDB

  • I believe what I should do then is create an array and a json within the construct, use Ajax to import the json into the array

    If you need to pre-load some data into the array, then yes - create an array file in the project and load it with AJAX. You don't need NWjs for this part.

    and then use NJWS to write the array into the json, right?

    If you need to save the contents of the (changed) array in runtime, you can either save it to local storage or write to a disk file with NWjs.

  • First, you need to add NWJS object to the project.

    NWJS Write Text File action to save.

    Array Load from NWJS.ReadFile("path") to load.

    And of course these will only work in the exported game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try searching the forum, there were a few posts about this.

    construct.net/en/forum/construct-3/general-discussion-7/nwjs-save-games-local-storage-178282

  • You do not have permission to view this post

  • You do not have permission to view this post

  • On all my gamepads (5 different makes) d-pad buttons are definitely buttons.

  • Also, when you compare enemy.x or distance() to the enemy using System expressions, they will only check the first enemy instance. If you have multiple enemies on the layout, these events will not work correctly. You need to pick an enemy instance first, or use "For Each" loop.

  • Containers don't work with families. You have two options:

    1. Create a separate health bar object for each enemy type, add it to a container.

    2. A better solution is to attach a healthbar to each enemy using the hierarchy feature. You can do this in runtime (in 'Enemy On Created' trigger), or manually in the layout editor.

  • You don't need an array to display the scores (unless you switch to another layout of course).

    You can use "System for each ordered" loop to go through all instances in their finishing order, and display their scores on the board.

    For Each Car ordered by Car.Time_Spent_Racing
    .. Final_Position=0 : Text append Car.Name & " still running" & newline
    .. Else : Text append Car.Name & " position " & Car.Final_Position
    
  • What kind of game is this? Platformer, top-down view, 3D first-person view?

    1. Generating a room design randomly may be tricky. Especially if you want these rooms to connect properly to each other, and not just teleport from room to room.

    2. There is a basic random() expression you can use. For example: random(100)<30 means a 30% chance.

    If you need more RNG features, there's an AdvancedRandom plugin.

    3. Use random() or choose() expression. For example:

    Set RoomIsDark to choose(0,1)

  • Another option is to use templates instead. Notice when you create an object you can specify a template. As I recall you can create a template in the editor from a selected instance.

    Yeah, templates is a great feature. But you still need to store these templates somewhere - on a separate repository layout.

  • A simple and very common solution is to create a separate layout to store such 'default' instances. They won't be using any RAM until you create a new instance in runtime.

  • len(string)

    You can find everything in the documentation:

    construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

  • Event #3 on your screenshot doesn't pick the correct ESoldier instance.

    Check out this demo:

    howtoconstructdemos.com/how-to-limit-the-angle-of-view-for-turret-behavior

    You can ignore the "limited angle" part, just set the LOS to 360 degrees.