Xavier's Recent Forum Activity

  • I'm wondering if maybe this is a C2 bug so I'll post it here for now.

    For some reason when I use an XML XPath expression with the asterisk attribute, nothing shows up on Internet Explorer, this same expression works in Chrome and Firefox. (See the provided .capx)

    Additionally, if I use an online XPath evaluation tool with the same expression, it shows the correct result in Internet Explorer. That's why I'm wondering if either I'm doing something wrong or it's a bug with C2.

    This is tested with the latest stable and beta C2 version and IE11. What do you think?

  • I had this problem some time ago, this is how I solved it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you.

  • I would like to list the contents of an array on the x dimension but exclude the cells that are empty (0).

    So if I have an array of words like this [Play] [0] [0] [Fire] when I display them this is what happens:

    Play

    0

    0

    Fire

    What I need is:

    Play

    Fire

    Thank you.

  • Link to .capx file (required!):

    Open Lighting.capx on the C2 examples.

    Steps to reproduce:

    1. Test with debugger on Chrome and move the cursor around.

    2. Try both canvas2d and WebGL and observe CPU utilization.

    Observed result:

    Cpu utilization with Chrome on WebGL is much higher (20%) than canvas2d (0-1%) even with a fast cpu.

    Expected result:

    At least the same performance than canvas2D or better.

    Browsers affected:

    Chrome: yes

    Firefox: no

    Internet Explorer 11 Preview: no

    Operating system & service pack:

    Tested on:

    Windows 7 Prof. 64 bits

    Windows XP 32 bits

    Construct 2 version:

    Tested on:

    r141 beta

    r139 stable

  • This was covered in the C2 class this past weekend, you might want to watch the video here where Yann shows how to stomp enemies:

    http://www.scirra.com/forum/construct2-live-class_topic65550_post409490.html#409490

  • This is actually not hard to do, you just need to use the plugin that jayderyu mentioned. Then it's as easy as adding the "Execute" action from that plugin to any part of your game. For instance, after a button is pressed, add the CallJS execute action and enter one of the names of the javascript functions the publisher needs, like "PUBLISHER_SUBMITSCORE()".

    You don't need to do anything else.

    As for the function to start the game it's a bit more technical but still easy. You can't add that function inside C2, you need to add it after you export the game by editing the index.html with a text editor. You only need to make 1 edit:

    Find the line: // Start the Construct 2 project running on window load.

    There you'll find the following code:

         

    jQuery(document).ready(function ()
              {              ?
                  ?// Create new runtime using the c2canvas
                  ?cr_createRuntime("c2canvas");
              });
    

    You need to replace all of that with this new code:

         {              ?
         function PUBLISHER_GAMESTART()
    {
       jQuery(document).ready(function () 
                  ?// Create new runtime using the c2canvas
                  ?cr_createRuntime("c2canvas");
              });
    }
    

    On the new code, replace PUBLISHER_GAMESTART with any name you need for the function to start the game. Everything should be ready after that.

  • I think if you put the spawners in a family, and then use the family for the spawn action it will pick a random spawner from that family.

    Also, you can use the system condition "Pick random instance".

    https://www.scirra.com/manual/124/system-conditions

  • It's really hard to give you advice if we can't see you project file.

    CocoonJS is still being developed and hopefully in the near future we'll have a webgl export, that will probably boost the fps even more.

  • Does anyone know if there is a way to speed up the physics on the handsets? I've removed most of the iterations on physics checking, and it is still slow.

    The rest of the app is normal speed, but Physics calculations are in slow motion, As if gravity was 1/4 or something.

    I don't know how to compensate for that. The collisions seem to be fine, but the speed at which objects fall is much slower on the handsset than desktop. I feel like this could be fixed with some mulitplier or DT calculation. Anyone have any thoughts on this?

    I think maybe you're looking for this:

    https://www.scirra.com/manual/98/physics

    Read the "set stepping mode" part.

  • Actually family behaviours were added a long time ago, what was added in the latest beta is the replace object which is something different, but thanks anyway.

  • Take a look at the browser object in the manual.

Xavier's avatar

Xavier

Member since 16 Dec, 2011

Twitter
Xavier has 7 followers

Trophy Case

  • 12-Year Club
  • x2
    Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies