Ashley's Forum Posts

  • I'll take a look at that soon.

  • I'm not sure exactly what's going on with the origin there so it will probably take some investigation. I'd suggest filing a bug with a demo addon so I can figure out the sequence of calls and if any APIs need to be changed.

  • Well, you can use ReplaceBlobAndDecode(), and just pass the blob of an empty image at a certain size. You could make it from a canvas element.

  • 2) I just realised there's a bug where these methods aren't minified correctly. It should be fixed in the next release (after r118).

    3) Every animation frame has its own origin, and the object itself separately has an origin. Sprites copy the animation frame origin to the object origin. It sounds like we need to make sure this happens when calling the SDK methods.

    4) I'm not really clear what you're trying to do? The SDK currently does not support removing animation frames, but why do you need to do that? Shouldn't you just add the correct sequence of frames?

    1. It looks like families aren't supported yet, probably an oversight
    2. It looks like you're trying to call that method on an event group, or the root node of the event sheet, or some other class that doesn't actually support adding conditions and actions. Make sure it's really an EventBlock (i.e. something returned by AddEventBlock())
    3. The documentation does not say the promise resolves with anything. Why are you expecting a return value from 'await'?
    4. For an empty frame at a specific size, see the documentation: pass a null blob but provide a size.
    5. Looks like an oversight
    6. Those definitely need to be fixed but I can't tell why they're happening. I would guess you are trying to use an animation frame before waiting for a promise that loads content in to it to resolve. You must not use them before any promises affecting them resolve.
    7. Use ReadBlob
    8. Yes, AddOrReplaceProjectFile() takes a "sound" or "music" kind.

    For new SDK features, please collect a complete list of everything you need then post an issue to GitHub listing them all.

  • The Array plugin internally maintains a 3D array at all times, even if it's only used 1-dimensionally. This means it's neither much use to expose it directly (since few libraries expect a 3D array), nor is it convenient for calling code to have to worry about maintaining the right structure of the array. So it exposes several accessor methods that allow you complete control over the array but guarantee you can't mess up the structure. So just use these to flatten to a 1D array or whatever else you want to do.

    The Array plugin ID is "Arr" not "Array".

  • You can compare the number and types of arguments and vary the expression depending on that. It's only a simple flag to say "unlimited extra arguments are allowed at the end". There aren't any options to finer control it, because nothing else in all of Construct needs it. Generally a variadic parameter is useful for math functions e.g. allowing the max expression to take any number of arguments and return the maximum of all of them. If your expression isn't doing something like that - maybe you should just have two expressions?

  • Are there any errors in the browser console?

    If all else fails you can clear the browser storage and reload the page - it will wipe all installed addons, and any projects saved to browser storage as well, so be warned.

  • I've updated the download links in the original post with a new version that should work around the issue with Cloud Save not working in the update. Can anyone confirm it solves the problem?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's all documented in the Editor API reference.

  • Are you using "Request fullscreen (centered)"? This bug was fixed:

    Browser: Request fullscreen 'Centered' incorrectly did 'Letterbox scale'

    Change it to request fullscreen letterbox scale and it'll work the same again.

  • When C3 imports a C2 project, it guesses the property IDs by transforming the property name. The easiest thing to do is choose IDs in C3 that match the ones it guesses. I think it will guess "script-files". If for any reason you can't do that or you need to change the type of data it imports, here's an example from Tiled Background that converts an "initial visibility" property to a boolean with the new ID "initially-visible":

    LoadC2Property(name, valueString)
    {
    	switch (name) {
    	case "initial-visibility":		// renamed, and map Visible/Invisible string to boolean
    		this._inst.SetPropertyValue("initially-visible", (valueString !== "Invisible"));
    		return true;
    	}
    }
    
  • Apologies for the inconvenience everyone, but the build service should be working again now. A few people have confirmed it works for them now.

  • Good point, missed those - will add for next release.