LoobyLoo's Forum Posts

  • You could add parenthesis. (Sprite.var=2)&(sprite.var=3)

    I think at least. It’s an order of operations thing or something. But for and I’d just add multiple instance compare conditions. That acts as an and

    (Text.var =37) & (Text.var =1) & (Text.var =8)
    

    it still doesn't work, maybe C3 somehow intentionally not allowing this to happen?

  • Thank you so much, this is exactly what I was looking for, and now I understand what I was doing wrong. 😊

    I just have one follow-up question. it works perfectly with the OR "|" operator, but not with the AND "&" operator.

    (If the scenario is, out of all the available objects, if few of them have the instance variable, like

    Text.var =37 & Text.var =1 & Text.var =8
    

    then it should be executed, but not sure why it is not working.

  • Please check the below image, hope it now makes sense. :)

    Basically, what I'm asking is how to use the "&" and "|" OR operators in the expression while comparing.

  • I figured it out,

    * On function 'Dialogue' → String

    -> AdvancedRandom: Set current probability table to "RandomDialogue"

    ----+ (no conditions)

    -----> Functions: Set return value AdvancedRandom.Weighted

    Thank you :)

  • I'm feeling lucky that, I got replies from the two legends of the c3 forum at the same time 😊. Thank you.

    "Functions.Dialogue("text here")"

    It works but for the same case

    If you didn't mean to do that, get rid of the parameter.

    how can I drop the parameter, and still make it work as expected?

  • Please check the image below, you will know what I am talking about, you can see I have made a function with the return type string, so whenever I put that as an expression on somewhere, here in this case, set text on a text obj, it gives me the error that

    "Incorrect parameters "The function" does not accept 0 parameters."

    What I'm doing wrong?

    Tagged:

  • Chances are there's an issue with your browser. The zoom level might have changed. If it still persists, try using a different browser. Make sure you've cleared the cookies and cache.

  • Thank you so much 😊

  • Okay, I understand what you are pointing out,

    Just to confirm this is where you want me to put this right?

    I can tell you that LayerToCanvasX and LayerToCanvasY conversions are not needed. When taking a snapshot simply specify X=Sprite.BBoxLeft, Y=Sprite.BBoxTop, Width=Sprite.width and Height=sprite. Height

    You just need to find the right formulas to calculate the resolution

    No matter what I tried the below action does not honor the DrawingCanvas size, it just exports it proportional to the viewport size.

    -> Browser: Invoke download of DrawingCanvas.SavedImageURL with filename "ss"
    

    This is the exact reason that happened to me with the CanvasSnapshot so that is why I posted this question. I request you to please check the attached c3p.

    Check out this post, maybe it will be useful:

    construct.net/en/forum/construct-3/general-discussion-7/canvas-snapshot-layertocanvas-168819

    This is the exact link I placed on my original question and inside the attached c3p too, based on that logic I created the c3p 😅

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is what I tried but still not working.

    Here is the test c3p.

    For e.g. I resized the sprite, let's say 3000x3000, and now it is present on the layout, just need to download the sprite with the same resolution.

  • I tried it with Drawing Canvas, but no matter what I tried, DC not working at all.

    Means, not fetching any object or color at all. I never used DC, I read the manual, but still couldn't figure out why it's not working.

    I took the screenshot into a sprite, Now how to transfer that sprite data to Drawing Canvas, and resize the DC to the desired size, then export, Please help me with the action/event.

    Not sure what I am doing wrong, I tried it startup the layout, disable the Antialiasing property option, etc.

  • I think I get the idea, but I'm not sure how to make it happen. Can you please show me how this works in the events?

  • TL;DR

    Construct 3 doesn't handle missing/unwanted files within the project folder correctly, causing "corrupt project" errors. Suggested solutions include saving all files or introducing a "Force Save" option.

    (The context of the issue is when you save as a Project Folder, not as a C3P)

    While saving a project, Construct 3 intelligently detects and saves only the specific changes made within a project folder. While this smart save feature is generally a time saver, it can lead to unexpected issues, especially when collaborating on projects or using version control systems like Git.

    Consider this scenario: I have a project located at "C:\MyC3Project\src," I make some changes to Layout 1 and hit the save button. Construct 3 detects my changes and saves only Layout 1. At this point, the save button greys out, indicating that my project is saved.

    Now, for the example, I decided to delete all the contents within the "C:\MyC3Project\src" folder while my project is still running in the browser. Later, To save it again I make a few minor edits to Layout 1 and hit save. In this situation, Construct 3, only saves the changes in Layout 1 (and some other UI states files, please refer to the below image), C3 ignores the fact that the rest of the project files are missing, Consequently, Since I saved the project when I attempt to reopen the project later time, I'll be greeted with a dreaded "corrupt project" warning.

    The example described above represents an extreme case, but Projects using systems like Git can sometimes face problems when syncing changes, discarding the changes, and When multiple members work on the same project, there's a higher chance of conflicts. You will be greeted with an error message if you are not careful.

    I have encountered this issue in the past (as have others), but I couldn't figure out why it happened. Today, when it happened again, I searched for the root cause and discovered this issue.

    Here are the discussions that may be related to the context I'm discussing:

    construct.net/en/forum/construct-3/how-do-i-8/failed-open-projectcheck-163195

    construct.net/en/forum/construct-3/general-discussion-7/found-bug-c3-178294

    Again, it's important to note that many people are not aware of this issue.

    To resolve this issue, the C3 should perform the following actions, in short, to update the Save button's functionalities.

    1. Examine all files present within the project folder.

    2. Save all files within the folder, including those that might be missing but are supposed to be there.

    3. Replace any files that have been altered with the updated versions.

    4. Remove any files that are no longer relevant or within the scope of the project folder.

    This solution would ensure comprehensive project integrity and eliminate the potential pitfalls associated with missing files.

    However given the limitations that can arise since Construct 3 is running in a web browser, where it may not be feasible to perform extensive file checks, because it may/can lead to a delay in the save operations, which hinders the user experience, So in that case I propose an alternative solution. To address this challenge and ensure project consistency, I suggest the introduction of an additional save option like "Save All" or "Force Save."

    This option is self-explanatory, it would initiate the following process:

    First, it would completely clear the contents of the designated project folder, such as "C:\MyC3Project\src."

    Then, it would proceed to save all project files into the emptied folder, ensuring a fresh and comprehensive save operation.

    In conclusion, implementing this feature would provide users with peace of mind and protect their projects from unforeseen file deletions or corruption. It's a crucial enhancement, especially for those working collaboratively or with version control systems. By offering this Construct 3 can further improve the reliability and stability of its project folders.

    Thanks for the reading, please share what you think about this.

  • If I may, could you please assist me with this

    construct.net/en/forum/construct-3/how-do-i-8/export-screenshot-ensure-size-178522