Question about using the Construct 3 Renderer's, Create Static.

0 favourites
  • 2 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hi Ashley, if you can spare some time, I need help on solving this problem when getting a drawing addon to support C3Runtime. Thanks in advance.

    The Runtime Methods Used


    		// The current animation frame to draw
    		var cur_frame = this.type.animations[0].frames[0];
    		var cur_image = cur_frame.texture_img;
    		var webGL_texture = this.runtime.glwrap.loadTexture(cur_image, false, this.runtime.linearSampling, cur_frame.pixelformat);

    As seen on the screenshot, It's using the method this.runtime.glwrap.loadTexture(). It works no problem on C2Runtime.


    As seen on the screenshot, I'm using the method this._renderer.CreateStaticTexture().



    No Errors.


    The console error.

    Construct 3 Runtime renderer, error reference.

    Checking the frame's texture_image

    I tried checking the frame's texture_image if it contains any data and leave a clue why this is happening.


    I logged it through the console.

    The image seems to be there and well, that explains it running well.


    Now checking the C3Runtime's frame texture_img.

    I logged it through the console.

    The image seems to be empty.

    It only returned the <img> tag, with of course, the error too.

    Ashley help would be really appreciated. If I made a mistake, please do tell. Thanks in advance.


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's hard to make sense of your code. Some of the pictures are partially minified which makes it harder to understand. That error means either the 'width' and 'height' properties of the thing you are passing as the texture data are missing, or are <= 0, so check you are passing something valid to create a texture from.

    Edit: oh, some of your C3 runtime code still references C2 runtime things which do not exist. For example texture_img does not exist in the C3 runtime. Check the SDK documentation. Also you should run this code in the debugger, that would make simple mistakes like this obvious.

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