RHenning's Forum Posts

  • 10 posts
  • Glad that you found the solution and shared it with others.

    Maybe you could go into a bit more detail so that others can learn too?

  • You need to send your dictionary to local storage in order to make it persist.

    Here is an article explaining it:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/local-storage

  • 1. Create the Pop-up Form UI:

    Use Text Input objects for the data entry fields.

    Add Buttons to submit the data.

    Use Text objects for labels (e.g., "Enter Health:", "Enter Speed:").

    Example:

    Add a Text Input for "Health" and another for "Speed".

    Add a Button labeled "Submit".

    Add Text objects for the labels next to each input.

    2. Create the Pop-up Layer:

    Make the form appear as a pop-up by creating a separate layer for it.

    You can hide and show this layer using the "Set Layer Visible" action.

    Steps:

    Create a new layer named "Pop-up Form".

    Set this layer to invisible by default.

    On button press or when triggered, use the event to make this layer visible.

    3. Handle Input and Store Data in Dictionary:

    When the user fills in the form and presses the submit button, capture the input from the text boxes and store it in a dictionary.

    For each sprite, you can use its UID as the key in the dictionary, and the properties (like health, speed) as values.

    4. Show the Pop-up for Selected Sprite:

    When you click on a sprite, you can trigger the form to pop up and allow data entry for that specific sprite.

    5. Updating Sprite Properties:

    After submitting the form, you can use the data stored in the dictionary to update the sprite’s properties (e.g., health, speed).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Array Structure:

    The X axis holds object UIDs (unique identifiers).

    The Y axis holds boolean values (0 or 1) to indicate whether an object is selected (1 for selected, 0 for not selected).

    2. On Object Click:

    When an object is clicked, toggle its boolean state (0 to 1, or 1 to 0) in the array.

    Then, loop through the array and untoggle (set to 0) every other object, excluding the one that was clicked.

    3. Event Structure:

    1. On Click Event:

    Use the On clicked condition to detect the object that was clicked.

    Get the UID of the clicked object.

    2. Toggle Clicked Object:

    Find the clicked object's UID in the array and toggle its boolean value.

    This will toggle between 1 (selected) and 0 (unselected).

    3. Untoggle Other Objects:

    Use a loop to iterate through the array and untoggle every other object by setting their boolean value to 0, excluding the clicked object.

  • To call JavaScript functions from within an event sheet in Construct 3, you need to use the "JavaScript" action.

    ou can add JavaScript directly to your Construct 3 project using the "Script" or "JavaScript" action.

    Script File: You can include an external JavaScript file by adding it to your project’s Scripts folder or by linking it in the index.html file if you have access to it.

    Inline JavaScript: Alternatively, you can add JavaScript code directly within Construct 3.

    In Construct 3, use the "Execute JavaScript" action to call JavaScript functions.

    Open the Event Sheet:

    Go to the "Event Sheet" where you want to call the JavaScript function.

    Add Action:

    Add a new action to the event.

    Choose "System" (or the appropriate object where you want to execute the JavaScript).

    Select "Execute JavaScript".

    Enter JavaScript Code:

    In the action’s properties, you can write the JavaScript code to call your function.

  • Do you need to know how to do everything or just how to pick the nearest target?

  • When copying and pasting tiles, use the built-in tilemap tools to ensure you’re copying the tiles correctly. Select the tiles using the "Rectangle Selection" tool in the Tilemap editor, then copy and paste them. Flipping tiles should work properly with these tools.

  • Check that the wall has Solid behaviour enabled.

  • I think to do this in Construct will be difficult and will rely on mathematical calculations in JavaScript.

  • When you need to save a user's state, create a unique key for each user. This could be a user ID or username.

    Use the Dictionary object to store values associated with this unique key.

    When a user returns, use their unique key to fetch their saved data from the Dictionary.

    To manage multiple users, you might use nested dictionaries or a JSON object where each user's data is stored under their unique key.

  • 10 posts