dop2000's Forum Posts

  • Adavo It works fine for me with the latest C3 build.

    Is it any specific action/event of the behavior which throws this error?

  • There is an expression Family.ObjectTypeName

    You can pass it to the function, and inside the function use "Create object (by name)" action.

  • Adavo Make sure to download the latest version of the plugin from Eren's comment above.

  • I believe array object is essentially a Javascript array, so you can estimate its memory usage:

    mattzeunert.com/2016/07/24/javascript-array-object-sizes.html

    This way at least we can show the loading progress for feedback instead of nothing.

    I actually stopped using loadingprogress expression, as it often doesn't refresh. Instead I'm showing a fake progress counter, something like this:

    Every random(1,2) seconds
    Progress set to min(100, progress+choose(0,1,2,3))
    Text set text "Loading ..." & Progress & "%"
    
  • [removed]

    EDIT: Never mind, found "LocalStorage Set/Get Binary" actions. I don't know how I never noticed them before!

  • It is possible with BinaryData plugin - you can convert the image to base64 string and save it to Local Storage. However, to restore it you will have to load the image into a sprite first, and then paste the sprite to DrawingCanvas. There may be some quality loss if window size has changed, for example. Also, if the image is large, base64 string may be really long (many megabytes)

  • You need to multiply by that expression, and add a small delay before "Save image" action - because pasting a large image may take a few ticks.

    The result in my case was an image with resolution 1081x1922. Which is pretty close, but I don't know how to make it exactly 1080x1920..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • when you create an event you can add only once "On Key Pressed", every other condition or sub-event will give only the option "Key is down".

    These are two different kinds of events. "On" event is a trigger, it fires only once when the key is pressed. Only one trigger is allowed per event. "Is" event is a condition, if this key is down, the event will run every tick, until the key is released.

    So the easiest way to fire the event once all three keys are pressed is this:

    On D pressed
    Is DownArrow down
    Is RightArrow down
    

    But of course it doesn't take into account how fast the keys were pressed and in what order. You need to save the time when each key was pressed. The array seems like an overkill for me, you can do it with a pair of variables - pressedRight and pressedDown.

    On DownKey pressed
    Set pressedDown to time
    
    On RightKey pressed
    Set pressedRight to time
    
    On D pressed
    Is DownArrow down
    Is RightArrow down
    pressedDown > (time-0.5)
    pressedRight > pressedDown
    ....... Play combo animation
    

    This event will fire when all three keys were pressed within 0.5s and in this order: Down->Right->D

  • I was going to suggest the same as lionz, but use a global variable instead of an instance variable on the button. The button won't remember its variable when you return to Layout1, unless it's set as global (which I don't recommend here) or has Persist behavior.

    So a global variable would be the easiest choice.

  • Ashley Ah, will do, thanks. I posted here mostly to see if anyone else have the same issue.

  • If you can reliably reproduce it please file an issue.

    You mean with Chrome support? How do I describe the problem? "Focus doesn't always work in some 3rd party app I'm using" - I really doubt they will look into it.

  • I am using the latest Chrome version 94.0.4606.54, and I deactivated all extensions, it didn't help.

    I also tried several different Construct releases - from r234 to r263, they all have this problem.

  • I think you need to resize the DrawingCanvas object to 1080x1920, either multiplied or divided by DrawingCanvas.pixelScale

    Resize the sprite to the same size and paste it on the canvas. Then save the canvas image:

    DrawingCanvas Save Image
    System Wait for previous action to complete
    Browser invoke download of DrawingCanvas.SavedImageURL
    
  • Have you tried using the keyboard object and "intercepting" the keyboard combination ALT+F4 ? (On Alt is down And F4 is down; trigger once while true)

    I can try this, but what's next? I will not be able to prevent the window from closing.

    oosyrag I'll try it, thanks!

  • oosyrag No, must be a different issue. And that flag they mention is no longer available.

    This only happens in event dialogs, I haven't noticed any other problems with focus in Chrome.