LoobyLoo's Recent Forum Activity

  • I have a sprite on the layout, and I've implemented logic where only the area covered by that Sprite is captured when taking a screenshot (using the "System: Snapshot Canvas" action)

    > -> System: Take snapshot of canvas (PNG, quality 75, offset LayerToCanvasX(1,Sprite.BBoxLeft,Sprite.BBoxTop)×PlatformInfo.DevicePixelRatio, LayerToCanvasY(1,Sprite.BBoxLeft,Sprite.BBoxTop)×PlatformInfo.DevicePixelRatio size Sprite.Width×(PlatformInfo.CanvasDeviceWidth÷ViewportWidth(1)) x Sprite.Height×(PlatformInfo.CanvasDeviceHeight÷ViewportHeight(1)))
    

    via)

    If I export the screenshot, how can I ensure its size? Let's say I want to export a specific area of the screen at an exact size of 277x277 pixels. How can I achieve this? Normally, when taking a screenshot, it adapts to the screen size, but I want to capture a particular area at a fixed resolution.

    One way it can be done is by turning off the full-screen mode in the display properties. However, this approach doesn't allow me to export it to Android. Please assist me.

    Here is the c3p.

    Edit:1

    Another way I think it is possible is that Before exporting the screenshot, resize it to the desired resolution, but I don't know how to resize it to a certain size and then let the user export that.

  • You can't upload to a specific frame, it always uploads to first frame of Animation AFAIK.

    You are right, we can't. I'm not sure why it's so limited. Nonetheless, it does the basic job.

    By the way, thanks again, I was able to figure this out.

  • Wow, thank you so much, this is exactly what I was looking for.

    Just one question: Can we set the animation set and then the frame? "FileChooser.FileURLAt(0)"

  • Hi, , thanks for your response.

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

    The transfer you requested has been deleted

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 😔

  • 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.

LoobyLoo's avatar

LoobyLoo

Member since 10 Jul, 2023

Twitter
LoobyLoo has 1 followers

Trophy Case

  • 1-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

6/44
How to earn trophies