SDK questions

0 favourites
  • 2 posts
From the Asset Store
Easily integrate Telegram Mini Apps SDK into your Construct 3 projects for building interactive apps and games.
  • I've run into two issues:

    1) how do I get blend modes to work? I have a drawing plugin, "world", supports-effect, pre-draw. I pass in sprites so I can suck out their textures, essentially for a custom particle mechanism. I've got things working nicely (spawming/movement), except I wan't the blend mode to be Additive. I've tried setting my plugin object to Additive, the layer to Additive, the base sprite to Additive, but nothing seems to make my quad call of the texture Additive.

    2) how can I find out when an an object is destroyed? In C2 I had this:

    this.myDestroyCallback = (function (self){

    return function(inst){

    self.onInstanceDestroyed(inst);

    };

    })(this);

    this.runtime.addDestroyCallback(this.myDestroyCallback);

    I can't find an equivalent.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1) how do I get blend modes to work?

    The runtime sets the right blend mode before calling the Draw() method, so it should work automatically. If you change the blend mode in the draw method, you'll need to re-apply the one you want, or save the existing one at the start of the draw method and re-apply it at the end,

    2) how can I find out when an an object is destroyed? In C2 I had this:

    this.myDestroyCallback = (function (self){

    return function(inst){

    self.onInstanceDestroyed(inst);

    };

    })(this);

    this.runtime.addDestroyCallback(this.myDestroyCallback);

    I can't find an equivalent.

    There's an "instancedestroy" event in the runtime. I added it to the docs here: https://www.construct.net/en/make-games/manuals/addon-sdk/runtime-reference/runtime

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)