Juryiel's Recent Forum Activity

  • Don't need one, I get what you're saying. I'll try it in a bit and report back. Thanks!

  • So just to clarity, Request File with Ajax, On Request Complete, ExecJS('myscript.js')? I don't think I quite understand how to set up Ajax correctly with this. Could you be a little bit more explicit? I appreciate the help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think loading a js files works with ajax, it needs to be included as a script. I'm not sure how to do that with ajax. The method I'm using now injects it into the document header as a script.

    I'll see if there's a way to check if a function exists with JS though, that might work.

  • Looks like it's because it takes a while for the js script to load, and the C2 action does not wait for that to happen prior to calling FunctionA. A 'Wait' as a sloppy workaround works, but is there a better method?

  • Hmm almost there but not quite working. So far I have this:

    var loader = document.createElement('script');  
    loader.type='text/javascript';  
    loader.src = 'myscript.js';  
    document.getElementsByTagName('head')[0].appendChild(loader); "[/code:1an8idce]
    
    in an execJS action.  When I do this 'myscript.js' shows under Sources in chrome dev tools.
    
    Next, I try to use the function FunctionA from the library in a browser ExecJS expression, but I get "Reference error: FunctionA is not defined"
    
    What am I doing wrong?
  • Perfect, thanks! One more question, what is the path to the files uploaded to C2?

    EDIT: Also, can I access variables made in JS in C2 expressions? I'm not quite sure I understand how the Browser.ExecJS works in terms of what it returns. E.g. if in that JS I assign some JS var variable1 to something how can I access it or return it?

  • I want to make use of a javascript library that's fairly easy to use (just include the script, then call a few functions). I'm not sure how to do that in C2 without making a plugin. I find the Execute Javascript action in the browser plugin but that's as far as I've gotten.

  • My bank (bank of america) was declining mine on both of my cards, probably because it's in the UK. I had to manually go into my banking, confirm that the charges were not fraudulent, and though they didn't go through it must have added scirra to a whitelist because then I was able to buy it.

  • What happens if two AJAX requests complete during the same frame? Assuming I have tags, will they both trigger when complete and keep their LastData correct so long as I'm within their completion trigger event?

  • Make the width a percentage of his health. So if current health is X and full health is Y, Healthbar Current Width = (Healthbar Full Width)*(X/Y) . You should define healthbar full width as the maximum width you want the health bar to be when the player has full health, rather than defining it based on his health.

  • I made this several days ago but was hoping you would try to work through the example yourself so you can figure out what's going on, and ask specific questions about where your attempts failed so we can help you understand the logic and make you a bit more independent <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">.

    Since that hasn't happened, here's the cap (only done for the red blocks), hopefully that's enough to get you going enough to be able to make any other modifications on your own.

    Any 3 or more red blocks that touch together in any sort of formation (they don't all have to touch each other, just be part of a connected group) are destroyed, and a new red block forms at a location of their average X and average Y

    https://dl.dropboxusercontent.com/u/308 ... merge.capx

  • The ... in his post is supposed to imply that you can extend that pattern to any number of characters, so set var=2 for the third ....

Juryiel's avatar

Juryiel

Member since 30 Sep, 2010

None one is following Juryiel yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies