Ashley's Forum Posts

  • Hmm, I think some browsers don't loop audio if you tell it to loop after you started playing, which breaks Construct 2's "loop last audio" pattern. That's annoying, browsers have always been rubbish at playing audio anyway, I'll see if I can fix that by adjusting the Play action to include a loop parameter.

  • You should always use the 'fullscreen in browser' setting when exporting for a mobile. That hides the link too.

    We aren't officially supporting AppMobi for the time being - right now as far as I know it doesn't do anything more than PhoneGap does, unless we change our code. It's on our todo list to see if we can improve this.

  • See how events work - events fundamentally work by picking individual instances.

    In this case you might want to pick it based on an instance variable, or maybe use the system condition 'Pick Nth'.

  • Can you post a .capx showing the problem?

  • I'm confused,

    I *need* Internet Explorer to run SCIRRA's software?

    I purposely gutted IE from this system. I don't want that on here, and if your program relies heavily on it, I probably will not purchase it.

    Construct 2 only uses it to show the start page, which is rendered in HTML. It doesn't use it for anything else at all, it's just because IE is the only browser engine that can be assumed to always be installed.

    How about this? Set the registry key 'HideStartPage' to the DWORD 1 in:

    HKEY_CURRENT_USER\Software\Scirra\Construct2\Preferences

    Then restart Construct 2 and it should skip loading the start page entirely. If the start page is the problem, that should fix it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm... sounds like this bug that was reported. Not sure what to do about it, since it's working for everyone else and there's no error message...

  • Forget about performance on individual events like that - it's a waste of time. Rendering a sprite will probably take 100 times as long as whatever difference there is, so it basically doesn't matter at all.

    I'd recommend using conditions in the object instead of conditions from "system" wherever possible, because events generally work better that way (not because of the performance).

  • 1. Boolean instance variable default default value (heh) should probably be 'False'

    Hmm - I guess you're right. Changed for next build.

    . Default image resizing option should probably be stretch instead of 'align top left'

    Not sure about this. Any thoughts from anyone else?

    . I'm not sure if this is even feasible, but the new feature that allows rotating/resizing of multiple sprites at once is practically useless (moving them is fine however). This would be much, much more useful if the sprites all rotated/resized around a common point instead of their respective origins.

    I think different people would have different preferences here... again, interested in any other thoughts. Also, how does resizing around a common point work?

    . Whenever I turn 'snap to grid' on or off, the ribbon hides itself.

    Click the 'pin' in the top right to keep the ribbon there.

  • No, 'instanceProto' does not refer to your instance, it prefers to the instance's prototype. You can store data to it because javascript allows you to store data in any object, but it is a different object to your actual instance. It's sort of the object the instance 'inherits' methods from. More on prototypes - it's a really weird part of javascript, took me a while to get my head round it myself.

    I think in your first example 'this' is actually just the global scope, because

    socket.onmessage = function (e)
    {
        this.foo = 5;
    }

    is basically equivalent to

    function temp(e)
    {
        this.foo = 5;
    }
    socket.onmessage = temp;

    where it's more obvious that 'this' does not refer to anything. A good example of the solution is the Mouse object, which attaches a function to mousedown that uses a closure to permanently reference 'this' from the calling scope:

         jQuery(document).mousedown(
              (function (self) {
                   return function(info) {
                        // this is the real function - 
                        // use 'self' instead of 'this'
                        self.onMouseDown(info);
                   };
              })(this)
         );

    It's a bit fiddly syntax, but that is the correct solution. As you can see it's easiest just to call another function so you can use a real 'this' instead of keeping using 'self'.

  • I'm not sure this can be fixed... by design if you leave a browser window open and press Preview, Construct 2 will refresh that window instead of opening a new window. If you change the preview browser and preview, then close it while leaving the old browser window open, Construct 2 can't tell whether it should launch a new browser window or refresh the currently open window.

    It was tricky to get Construct 2 to refresh an existing browser window, and the method it uses to do that is browser neutral (i.e. doesn't take in to account different browsers). So I think it might have to stay as a quirk. I suppose just remember you close browser windows before switching preview browser.

  • Please see how to report bugs, we usually cannot do anything about bugs without a .capx file.

  • Ah, I see. There was a quirk in the order layouts are initialised in. For the first tick it did indeed have the last time's view position. It should be fixed for next build.

  • Could you try upgrading to IE9 since you're on Win7 and let me know if that fixes it?

  • Nice idea! I might steal a few of these...

  • Armitage1982, I'm not sure what your question was from your last post. Could you clarify what you were asking?

    Javascript can be coded in an object oriented style if you choose, just because the language doesn't have the keyword 'class' doesn't mean you can't. And I already mentioned javascript is compiled to machine code these days so is pretty fast, although obviously not as good as C++. Performance varies depending on your machine and browser so you should just try stuff out to see if it's fast enough for your purposes.