quackgyver's Forum Posts

  • Works fine for me, with or without pointer lock. Is your event sheet linked? Do you have any other events that change the debug text?

    The events in my screenshot is the entirety of the events in the project. Nothing else should be affecting the debug text output.

    dropbox.com/s/ra38a3aevpzjbg3/mousemovement.c3p

    Yeah, this also doesn't work for me. It just shows 0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I've got my events set up as such:

    However, Mouse.MovementX and Mouse.MovementY won't update:

    The code I'm using to output the values is:

    "MovementX: "&Mouse.MovementX& "MovementY: "&Mouse.MovementY

    Anyone know why it won't work?

    Thanks in advance.

  • It doesn't really seem like preloading is respected in Safari on macOS.

    I've set up a "trigger once" to preload a sound effect from the "Sounds" folder.

    Once 2 seconds has passed and all preloads are complete, the project proceeds to the next action, which plays the sound effect in sync with an animation.

    This works fine on all browsers except for Safari on macOS.

    The issues with Safari on macOS specifically are:

    - In preview mode, no audio plays at all.

    - In remote preview audio doesn't seem to preload the way it does in other browsers, and the sound effect lags behind.

    Anyone know why this is and how to fix it?

  • What's causing this error message, and how can it be resolved?

  • What C3 object ?

    Please provide clearer informations regarding what you are trying to achieve and how your project is configured for that currently.

    Sure, I can break down the use case described in the original post:

    • We're storing the URI of an image resource somewhere in Construct 3 (variable, object data or otherwise).
    • We need convert the image that is accessible via the URI to base64.
    • We don't want to use plugins to achieve this (or at the very least not non-vanilla plugins).

    You recommended using JavaScript to achieve the conversion from image to base64, but my question is how we would be able to access a URI that is stored somewhere in Construct in JavaScript code, given that the URI is stored somewhere in the project.

    EDIT:

    If it helps, we can imagine for the sake of discussion that the URI is stored in a parsed JSON object that we would want to be able to access via JavaScript, assuming that JavaScript is the only way to achieve the desired result.

  • You could use the binary plugin to hold the base64 data, and get it from there.

    I meant the other way around. How do I access the URI that I have in a Construct 3 object from within a snippet of JavaScript code?

  • You could use the Scripting feature in order to use the javascript function that does so.

    https://www.construct.net/en/make-games/manuals/construct-3/scripting/overview

    https://stackoverflow.com/questions/30631927/converting-to-base64-in-javascript-without-deprecated-escape-call

    Thanks!

    How can I fetch the image URI via a JavaScript call in this context though?

  • It's not! If it's red it's not associated. Just try adding a new Else and move on.

    I don't understand what you mean.

    I'm asking why the "Else"-case is red, given that it should be valid in that image.

  • Is it possible to convert an image accessible via URI to base64 without using plugins?

  • It's not associated at this point. It must have belonged elsewhere, and that IF was deleted. If you try to add Else to the len() IF, it will add one, in black.

    I'm not understanding your explanation.

    What do you mean by "It must have belonged elsewhere"?

    Based on the image that I provided the "Else"-condition should not be red, since it's a valid event structure.

  • the fact that it is red means it has been orphaned from the condition it was attached to. whatever that was has been deleted, so the else turns red to let you know it is not an else for anything at the moment. There is a condition above it but the else is not connected to it in any way except that the else is the next thing on the event sheet. delete the else, right click on the event above and add a new else if that one needs an else.

    I'm not following. Putting "Else" in its own condition following another condition has always been a valid way of using "Else".

    I don't understand how the "Else" in this case could be orphaned when it's related to the condition above?

  • I don't think it is connected to the event above

    How do you mean? It's placed right after the first event.

  • Why is "else" red in the attached image?

  • You would essentially create a third party editor when you set the state of the tilemap, use the Browser plug to download the json either Tilemap.TilesJSON, or Tilemap.AsJSON I'm not sure, then import that file into project files for use with Ajax during runtime when you set the texture.

    The json should have all the data you need to completely change an existing tilemap, aside from the image data.

    Yeah but I'm not asking how to change the Tilemap image data. I'm asking various questions related to the image size not changing when changing the Tilemap image.

  • I would say you probably need to take a look at using the json save state, and using it if you need to import stuff besides the texture.

    Not sure I'm following. How do you mean?