AllanR's Recent Forum Activity

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • That is awesome! very well done!

  • Awesome! I will try that out in a few minutes.

    Thanks!

  • I need to load an external image into a sprite and allow the user to resize and crop it. I got that working pretty well with the FileChooser, DrawingCanvas, and BinaryData. But if the original image is really big the final result looks terrible.

    So, I went looking for a javascript routine that can resize an image without all the artifacts, and I found one that does a great job! I can have the script load an image and resize it, and load that into the DrawingCanvas object. But I can't find a way to send the image from Construct to the script...

    I can load an image into a sprite, paste that into the DrawingCanvas, and save that to BinaryData, and access the BinaryData object in the script, but I don't know how to load that into img.src or an ImageData variable that the script can work with.

    Is there a getImagePixelData (opposite of loadImagePixelData) for the DrawingCanvas?

    Anyone know how to get image data in the BinaryData object loaded into an img element?

    https://www.rieperts.com/games/forum/resize.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sounds like a picking problem. If more than one of the "Container" objects is picked, then it will only compare the water.value to the first of the container objects unless you do a For Each container loop, or use some other method to make sure you are comparing to a single object.

  • the controls are anchored to the viewport edges (at the start of the layout), but then the car has scroll to which moves the camera to the bottom of the layout - so the controls are now way off screen.

    since you want the controls to always be on screen, make a new layer, with parallax 0%, 0% (so that it doesn't scroll). put the controls on that layer - and move them up to the top of the layout so that they are within the visible area (above the dotted line).

  • looks like this might be an option...

    -webkit-touch-callout: none; /* iOS Safari */

    -webkit-user-select: none; /* Safari */

    -khtml-user-select: none; /* Konqueror HTML */

    -moz-user-select: none; /* Old versions of Firefox */

    -ms-user-select: none; /* Internet Explorer/Edge */

    user-select: none; /* Chrome, Edge, Opera and Firefox */

    but I think it is a bad idea to try to force a form control to do what you want here. I would make my own out of sprites... especially if people will be using this on a mobile device.

  • I didn't mean anything to do with CSS, you can set the TextInput to Disabled in the layout properties bar, or with a C3 action. Then the user can't click on it to highlight text or have the control intercept keyboard presses - which can still happen if it is on screen and just invisible.

  • you could try setting it to disabled, or have it be off screen...

  • one minor little difference...

    event seven - in C3 you set value at Loopindex to aleatorio

    in C2 you set value at ateatorio to Loopindex.

    so, it should work fine after fixing the C3 version, but I would do this a little differently - put the numbers in the array in sequence, and then loop through the array and randomly swap them with a different location (so each value gets moved at least once), or put them in one array and randomly pull one out and put in a second array until there are none left in the first array.

    this way seems inefficient because it forces it to repeatedly pick a random location to put loopindex until it finds an empty location, which could take a while, especially for the last few spaces. The bigger the array, the less efficient it would get. For a small array you wouldn't have a problem though...

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies