gumshoe2029's Recent Forum Activity

  • Ah, the two errors in the image are related, and it is directly due to my proxying. I fixed it by copying the loading-logo.png and the offline.appcache into my root directory for Apache.

  • Has anyone seen the error: "Uncaught InvalidStateError: failed to execute 'drawImage' on 'CanvasRenderingContext2D' : The HTMLImageElement provided is in the 'broken' state."?

    This error appears in the Google Chrome Developer Console, and disappears when reloading the content a few times. I suspect this error is also related to the fact that the Construct JS file comes up with a blank screen on the first load, or it could be due to the fact that I am proxying all of my content through a gateway server.

    The website that I am in the process of building is here: http://50.112.151.9/home

  • I am using Construct to build a website in addition to the game itself, and I ran across an issue where I am attempting to dynamically load content from a JSON file like:

    {

    "p1":["This is a paragraph of text for JSON delivery. 1","500","200","2200"],

    "p2":["This is a paragraph of text for JSON delivery. 2","500","300","2200"],

    "p3":["This is a paragraph of text for JSON delivery. 3","500","400","2200"],

    "p4":["This is a paragraph of text for JSON delivery. 4","500","500","2200"],

    "p5":["This is a paragraph of text for JSON delivery. 5","500","600","2200"],

    "p6":["This is a paragraph of text for JSON delivery. 6","500","700","2200"],

    "p7":["This is a paragraph of text for JSON delivery. 7","500","800","2200"],

    "img1":["wizard2.gif", "800", "900", "0"],

    "img2":["Wizard_Male.png", "800", "400", "0"]

    }

    where the array elements are: ["text","x-location in pixels","y-location in pixels","text box width in pixels (or 0 for images)"]

    This has required me to create a very large number of objects (and their corresponding events) per page in order in order to contain unique content in each object.

    It would be nice if you could somehow expand the "Image Animation" feature such that you can dynamically create new sprites from an animation frame (or just keep already created image sprite instances on their current frame and allow new instances to be independently flipped to a different frame), allowing the loading of multiple images into a single sprite object (and it would be nice if something similar for text objects could be implemented).

    It would expand Constructs market from purely being a game making engine into a broader website creator tool.

  • It would be nice to enable all hrefs called from the JavaScript to be pre-pended with a customizable URI string in order to support the allowance of proxy server usage with Construct2 applications.

    i.e. all href: "/images" would become -- href:"/" + serverName + "/images"

    This way I can proxy requests in Apache HTTPD around to back-end servers allowing me to firewall off the back-end server.

    I am kind of working around it, but a couple of elements (such as the 'loading-logo.png') fail to load when running Construct JS via a proxy server, but any kind of proxy server support would be nice.

  • Yea, I'll do that when I have a chance to unwind it from my proprietary work.

  • I still have sporadic problems with changing opacities on some objects. There is definitely a bug in there somewhere..

  • Ah, yea, the behavior fade looks like it might work better. I'll let you know when I test it further.

  • Either there is a bug in the sprite's set opacity, or I am doing this loop wrong somehow:

    When I set logoFade to 1 it should change the opacity based on the current opacity, and stop when it reaches 0 or 100.

    Ideas?

  • I got the "Else" working now. I was layering the events incorrectly as subevents of the subevents. Thanks for your help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The for loop that is readily available in Construct Events does not support that though, at least not that I have found.

    You either have:

    for 0 :100{
        if(condition)
        if(condition)
        if(condition)
        if(condition)
        if(condition)
        actions
    }[/code:31xnz5q1]
    
    Which will execute all of the actions upon any one of the conditions being true, or you have:
    [code:31xnz5q1]
    for 0:100{
        if(condition) action
        for 0:100{
            if(condition) action
            for 0:100{
                if(condition) action
                for 0:100{
                    if(condition) action
                ... 
                }
            }
        }
    }[/code:31xnz5q1]
    
    Which logically should do what I need, but hangs.
    
    Could I write a custom JS block to do exactly what I put above?  Yea, but I would like to avoid that as a first option.
  • Hey all,

    Firstly, my apologies if this question has been asked before, but my cursory forum search did not turn up what I am looking for.

    I am trying to do one loop with multiple conditions, something like:

    for(i = 0; i < array.size(); i ++){
        if(param=1)  Create Object 1;
        else if(param=2) Create Object 2;
        else if(param=3) Create Object 3;
        else if(param=4) Create Object 4;
        else if(param=5) Create Object 5;
        else if(param=6) Create Object 6;
        else if(param=7) Create Object 7;
    ... so on.
    }[/code:dpgskplu]
    
    I tried doing a series of For loops, but that hangs my program since I have a large number of objects to loop through.
    
    Ideas?
  • gumshoe2029

    Uh, it's a bug, I had fix it. Try to download plugin again.

    capx

    Beautiful, it works flawlessly now, thanks!

gumshoe2029's avatar

gumshoe2029

Member since 4 Mar, 2014

None one is following gumshoe2029 yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies