winkr7's Forum Posts

  • How is that hex based game you were working on coming along?

  • You can have variables with group scope, so you might double check that for vars with the same name.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My main interest is using them as a quest system (which uses lots of conversation) similar to the quest system in rpg maker by VisuStella MZ. The problem I have is where

    to put functions that determine when a quest stage is completed. In theory a quest stage can be completed at any point or time so I set some kind of global flag but I did not find a clear way to integrate the function into the flow chart.

  • I have had a hard time with hierarchy and persist. I make up a family called myPersist (or whatever name) and to be in the family you have persist on. This didn't fix the pin trouble, but it helped with some of the hierarchy problems.

  • I noticed something similar with 3d drawing. change the z of your layer +-1 and see if that has results. I think the drawing order gets effected by opacity in some situations, but this was about a year ago and things may have changed.

  • If your game is successful enough that anybody cares you can worry about it then and should be happy you have the problem. Everybody and their dog is using AI art for their new games.

  • I have to agree with Asmodean, there just isn't enough of construct 3 to train the AI brain. In RPG maker (MZ) I can ask either Gemini or Chatgpt4o to write a javascript script and it is usually spot on. The AI even knows about things like addon library's and what they can help with (visustella).

    Alas, I haven't been able to get the AI to be much help in Construct 3.

    yours

    winkr7

  • I always start from scratch--except for the graphics. However, don't take my advice, I never finish anything.

    yours

    winkr7

  • Sorry to hear it. Good luck with whatever you do instead.

    yours

    winkr7

  • I have to agree. I spent years sticking stuff in different header files and compiling libraries -- in the end it is such a dream to use events and no code. The amount you can get done in just the layout files is impressive too.

    C3 has a natural organization to it that I follow and I can come back to stuff I did years ago and it still works.

    However, I think you should be working on the ultima iv type project.

    yours

    winkr7

  • Here is what chatGPT40 says:

    To encourage users to add your Construct 3 game to their homescreen and ensure the "request install" option is only shown when appropriate, you can follow these steps:

    ### Step 1: Add the "Request Install" Option

    Construct 3 has built-in support for web apps and adding to homescreens. Use the "Browser" object to request the install prompt.

    1. **Add the Browser Object:**

    - In your project, right-click and select "Insert New Object."

    - Choose "Browser" from the list of objects.

    2. **Request Install:**

    - In your Event Sheet, create an event that triggers when the game is first launched (e.g., `On start of layout`).

    - Add an action: `Browser -> Request install`.

    ### Step 2: Detect if the Game is Running Offline

    You can check if the game is running offline by using the "Browser" object’s condition `Is online`.

    1. **Create a Global Variable:**

    - Create a global variable (e.g., `isInstalled`) to track whether the game has been added to the homescreen.

    2. **Check Online Status:**

    - In your Event Sheet, create an event to check if the game is online.

    - Add a condition: `Browser -> Is online`.

    3. **Set Up Logic to Show/Hide Install Prompt:**

    - If the game is online and not installed (`isInstalled` is false), show the install prompt.

    - If the game is offline, set the `isInstalled` variable to true, assuming it has been added to the homescreen.

    ### Example Event Sheet Setup

    ```plaintext

    Global Variables:

    isInstalled (Boolean) = false

    On start of layout:

    Browser -> Request install

    Browser -> Is online:

    Trigger once:

    If isInstalled is false:

    Browser -> Request install

    Browser -> Is offline:

    Set isInstalled to true

    ```

    ### Step 3: Add Logic for Persistent State

    To ensure the `isInstalled` variable retains its value across sessions, you might need to use local storage.

    1. **Add the Local Storage Object:**

    - Insert the "Local Storage" object into your project.

    2. **Save and Load the Install Status:**

    - When the game detects it is offline, save the `isInstalled` state to local storage.

    - On start of the layout, load the `isInstalled` state from local storage.

    ### Example Local Storage Implementation

    ```plaintext

    On start of layout:

    Local Storage -> Check item "isInstalled"

    Local Storage -> On item "isInstalled" exists:

    Local Storage -> Get item "isInstalled"

    Local Storage -> On item "isInstalled" missing:

    Set isInstalled to false

    Browser -> Request install

    Local Storage -> On item "isInstalled" get:

    Set isInstalled to Local Storage.ItemValue

    Browser -> Is offline:

    Set isInstalled to true

    Local Storage -> Set item "isInstalled" to true

    ```

    ### Summary

    By setting up these events, your game will:

    1. Prompt the user to add it to their homescreen on the first launch.

    2. Detect if it’s running offline and assume it’s been installed.

    3. Use local storage to remember the install state across sessions, ensuring the install prompt is not shown again once the game has been added to the homescreen.

    This approach provides a smooth user experience and encourages users to install your game while respecting their previous actions.

    I asked chatGPT4o to respond to the original post as an addon developer. Here is what it said:

    ## Response from an Addon Developer

    Dear Construct Team,

    I have read your announcement regarding the introduction of the new addon SDK v2 with great concern. As an addon developer who has invested a significant amount of time and effort in building addons for Construct, I feel compelled to share my perspective on this matter.

    ### Impact on Existing Addons

    The transition to SDK v2, while necessary from a maintenance standpoint, poses a substantial challenge for developers like myself. Many of us have created addons that rely on accessing internal details of the runtime, not out of disregard for guidelines, but because it was often the only way to achieve the desired functionality. These addons have been instrumental in expanding the capabilities of Construct and meeting the needs of its users.

    ### Challenges of Migration

    The migration process to SDK v2 is not a trivial task. Here are some specific concerns:

    1. **Significant Rework**: Updating existing addons to comply with the new SDK v2 will require extensive rework. For complex addons, this might mean rewriting large portions of code, which is time-consuming and resource-intensive.

    2. **Feature Gaps**: The new SDK v2 may not cover all the features that were accessible through internal details. This could result in the loss of functionality for some addons, affecting users who rely on these features.

    3. **Support and Updates**: Many addon developers, including myself, are individuals or small teams. Keeping up with frequent changes and maintaining compatibility across versions is a considerable burden.

    ### Request for Support and Consideration

    Given these challenges, I would like to request the following from the Construct team:

    1. **Extended Support for SDK v1**: While I understand the need to phase out the old SDK, extending the support period for SDK v1 beyond the proposed timeline would give developers more time to adapt and ensure a smoother transition.

    2. **Comprehensive Migration Tools and Documentation**: Providing detailed migration tools and extensive documentation, including examples and tutorials, would greatly assist developers in updating their addons.

    3. **Feature Parity**: Ensuring that the new SDK v2 offers parity with the internal features previously accessible would help prevent any loss of functionality for existing addons.

    4. **Open Communication Channels**: Maintaining open lines of communication between the Construct team and addon developers will be crucial. Regular updates, feedback loops, and support channels will help address concerns promptly and collaboratively.

    ### Conclusion

    While I recognize the necessity of moving towards a more maintainable and robust SDK, the impact on existing addons and their developers cannot be underestimated. The success of Construct relies heavily on its community of addon developers, and supporting us through this transition is vital. I am committed to adapting my work to the new standards but urge the Construct team to consider the challenges we face and provide the necessary support to ensure the continued success of the Construct ecosystem.

    Thank you for your understanding and consideration.

    Sincerely,

    [Your Name]

    Addon Developer

  • To achieve the effect where the player object remains stationary and the background rotates, you can implement the following steps in Construct 3:

    1. **Keep the Player Object Centered:**

    - As you've mentioned, use the "Scroll To" behavior on the player object to keep it centered on the screen.

    2. **Rotate the Background:**

    - Instead of rotating the player object, rotate the background layer or the enemy sprites. You can achieve this by manipulating the angle of the layer containing the background or the enemies.

    Here's a detailed step-by-step approach:

    ### Step 1: Add Scroll To Behavior to Player

    1. **Select the Player Object:**

    - Click on your player object.

    2. **Add Behavior:**

    - In the properties panel, click on "Behaviors" and then "Add New Behavior."

    - Select the "Scroll To" behavior to keep the player centered on the screen.

    ### Step 2: Rotate the Background or Enemy Layer

    1. **Create a Background Layer:**

    - If you haven't already, create a new layer for your background.

    - In the "Layers" panel, click on "Add Layer" and name it "Background."

    2. **Rotate the Background Layer:**

    - To rotate the background layer based on player input, you need to update the layer's angle in response to the WASD keys.

    ### Step 3: Add Event to Rotate Background Layer

    1. **Open the Event Sheet:**

    - Go to the event sheet where you handle player input.

    2. **Add Keyboard Events:**

    - Add events to handle the WASD keys.

    - For each key, update the angle of the background layer.

    Here's an example of how you might set this up:

    ```plaintext

    Event: Keyboard -> On W key pressed

    Action: System -> Rotate layer "Background" by -1 degrees

    Event: Keyboard -> On S key pressed

    Action: System -> Rotate layer "Background" by 1 degree

    Event: Keyboard -> On A key pressed

    Action: System -> Rotate layer "Background" by -1 degrees

    Event: Keyboard -> On D key pressed

    Action: System -> Rotate layer "Background" by 1 degree

    ```

    ### Step 4: Fine-Tune the Rotation

    You may want to adjust the rotation amount or implement smooth rotation using variables for a better effect.

    Example of smooth rotation using a variable:

    1. **Create a Variable for Rotation:**

    - Create a global variable, e.g., `Global number RotationSpeed = 0`.

    2. **Update the Variable on Key Press:**

    - Instead of directly rotating the layer, update the `RotationSpeed` variable based on key presses.

    ```plaintext

    Event: Keyboard -> On W key pressed

    Action: System -> Set value RotationSpeed to -1

    Event: Keyboard -> On S key pressed

    Action: System -> Set value RotationSpeed to 1

    Event: Keyboard -> On A key pressed

    Action: System -> Set value RotationSpeed to -1

    Event: Keyboard -> On D key pressed

    Action: System -> Set value RotationSpeed to 1

    ```

    3. **Apply the Rotation in Every Tick:**

    - Use the `RotationSpeed` variable to rotate the background layer smoothly.

    ```plaintext

    Event: System -> Every tick

    Action: System -> Rotate layer "Background" by RotationSpeed degrees

    ```

    4. **Reset RotationSpeed when No Key is Pressed:**

    - Reset `RotationSpeed` to 0 when no movement key is pressed.

    ```plaintext

    Event: Keyboard -> On key released

    Action: System -> Set value RotationSpeed to 0

    ```

    By following these steps, you can create a game where the player object remains stationary while the background rotates based on player input, giving the desired effect.

  • This is what chatgpt40 says:

    In Construct 3, you can determine the x-coordinate position of a sprite using the sprite's `X` property. Here are the steps to find the x-coordinate position of a sprite:

    1. **Access the Event Sheet:**

    - Open your project in Construct 3.

    - Navigate to the Event Sheet where you want to determine the sprite's x-coordinate.

    2. **Add an Event:**

    - Add a new event by clicking on "Add event."

    - Select the condition that will trigger when you want to check the x-coordinate. This could be something like "On start of layout," "On collision with another object," or any other event that fits your needs.

    3. **Add an Action:**

    - Within the event, add an action by clicking on "Add action."

    - Select the object (sprite) for which you want to get the x-coordinate.

    4. **Get the X Property:**

    - To retrieve the x-coordinate, use the expression `Sprite.X` where "Sprite" is the name of your sprite object.

    - You can use this expression to store the value in a variable, display it on the screen, or use it in any other way you need.

    Here's an example:

    ### Example: Displaying X-Coordinate on Screen

    1. **Event:** On start of layout

    2. **Action:** Text -> Set text

    - Text object: Choose the text object where you want to display the x-coordinate.

    - Text: `Sprite.X`

    ```plaintext

    Set Text to Sprite.X

    ```

    ### Example: Storing X-Coordinate in a Variable

    1. **Event:** On start of layout

    2. **Action:** System -> Set value

    - Variable: Choose or create a variable to store the x-coordinate.

    - Value: `Sprite.X`

    ```plaintext

    Set Variable 'SpriteX' to Sprite.X

    ```

    ### Example: Using X-Coordinate in a Condition

    If you want to use the x-coordinate in a condition, you can directly reference `Sprite.X` in the condition.

    1. **Event:** System -> Compare two values

    - First value: `Sprite.X`

    - Comparison: `<, >, =` etc.

    - Second value: Any value or another variable

    ```plaintext

    Compare Sprite.X < 100

    ```

    By following these steps, you can easily determine and use the x-coordinate position of a sprite in Construct 3.

    So just to understand this, if we uses a 3rd party ad-on like Chadori's and they decide not to update it to SDK v2, our projects will break?

    You can always use an older version of c3 to build whatever worked before. All the older versions are out there (take a look and see).

    I am sure I am not alone when I say I would really like to see Ashly post everything he has said about this on this thread over again, and then copy that and post it again and sign it in blood.

    yours

    winkr7