LoobyLoo's Forum Posts

  • Hi, , thanks for your response.

    I'm unable to access the file, greeted with this message

    The transfer you requested has been deleted

  • Thanks, Oosyrag sir. You've really helped me understand a lot better. :) :)

  • Hi fedca, thanks for your response, but how do let the user upload the image (which is not included in the project)?

  • How do I let user upload their own image (not from the internet but locally using file chooser or file system?) and then use that image as a frame of an existing sprite?

    Tagged:

  • Like this? Still I am unable to do so 😔

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It can be. Just pass the uid of the picked instance as a parameter to the function, and add a pick by uid condition into the function.

    Just shake of learning, Could you be more specific,

    I tried many ways, yet couldn't figure it out.

    like

    + Touch: On touched AddButton

    -> System: Create object Button on layer 0 at (0, 0), create hierarchy: False,

    -> System: Set uid_gv to Button.UID

  • If the function can't PICK on its own, that's why we include the comparison logic. But still, it's not honoring the comparison logic. It's a bummer, I thought the function parameter was designed to be used like this.

    I frequently come across this type of situation, and I had believed that functions could assist me in these scenarios using parameters. 😩

  • I still do not understand, why this function is not working.

  • Thanks for the c3p, igortyhon. You've streamlined the code so well. I'm still learning a lot from it, even though some parts are a bit challenging for me. But I couldn't ask for anything better.

    Oosyrag, thanks for your response. I've been using C3 for quite some time, but I've never attempted these advanced concepts. Thanks to you and others, my understanding is becoming much clearer.

    I will attempt to replicate what igortyhon has efficiently done in just a few lines of code, whereas I took around 100 lines for the same task. Please pardon me if I ask any further basic questions in the future.

  • Hi oosyrag, I'm still learning the loop part. Could you please be more specific?

  • I'm simplifying my question now. This differs from my initial query in this thread. Rather than starting a new thread, I'm posting it here.

    The logic I applied here is to create buttons, place them dynamically side by side with padding, and adjust their positions according to the base. The aim is to center their alignment in real-time, similar to how we handle the text alignment, but here, instead of text, it is the sprite.

    Please download the C3P file and preview it. This will make it easier for you to understand what I'm trying to say.

    The below code I've written is functioning,

    I attempted it using a function, but it didn't work

    Also, this part

    Is there a way to further simplify this? Currently, for each of the n numbers of buttons, I need to apply the compare logic separately. Is there a more efficient approach?

  • Okay.

  • I encountered a bug in C3 while saving the project. I had an image named "SpriteTest" in C3, which I then renamed to "EnemySprite" directly within the layout. After making some changes in the event sheet, I hit the save button, waited a few seconds for the save to complete, committed it to git, and then shut down my machine. However, today when I opened the project, I was greeted with the following error message:

    "Failed to open project. Check if it is a valid Construct 3 folder project."

    I pressed F12 to open the browser console and found something interesting. The sprite "EnemySprite" (the one I renamed from "SpriteTest") wasn't saved, and I encountered this error:

    "projectResources.js:583 Failed to read file 'images\enemysprite-animation 1-000.png': DOMException: A requested file or directory could not be found at the time an operation was processed."

    I quickly verified the git commit and the project folder. I was confirmed that the "EnemySprite" sprite wasn't saved. The previous "SpriteTest" sprite was still present in the images directory.

    After renaming the old sprite to "EnemySprite," the event sheet updated with all the relevant code involving the "EnemySprite." However, upon saving, C3 didn't update the image directory but saved all the changes in the layout and event sheet. When I examined the git commit history, I confirmed that "layout.json,", "eventsheet.json,", "project.c3proj," and "project.uistate.json" were all updated, yet there was no indication of "SpriteTest" being renamed to "EnemySprite."

    When attempting to replicate the issue, I couldn't do so. It seems to be random, but I stumbled upon a community post where people faced the same problem.

    I'm asking the more experienced users: Have any of you faced this before? Can it be avoided? Since it's not easy to recreate, fixing it might be tough for the C3 team. But if anyone manages to reproduce it, please report the issue.

    By the way, Thanks to DOP2000. His post literally saved my project from corruption.

    Edit: Someone in GitHub posted a similar bug (the error occurred when the layer is deleted).

    Tagged:

  • Hi, Have you got the solution?

  • Wow, I never thought this would work this way, Thanks!