trueicecold's Forum Posts

  • Hey all

    I've tried using the new cocoonJS plugin, and have found several issues preventing me from testing it, browser and launcher due to multiple JS errors.

    Here are the solutions that made it possible (finally!)

    Problem

    Getting C2 error:

    Condition: FileExists(min_js)

    File: html5.cpp

    Line: 1693

    Function: void __cdecl Exporter::DoExport(class era::IProject *,class era::ILayout *,bool,struct HWND__ *,bool,bool)

    Build: release 186 (64-bit) checked

    Component: HTML5 exporter

    (Last Win32 error: 2)

    Solution

    The new cocoonjs plugin edittime.js has a typo when using dependency "achievement_locked.png". Make sure the name of the image and the dependency are the same.

    Problem

    Getting JS error (Launcher only):

    jQuery is undefined (got it from "jquery.equalheights.js")

    Solution

    In the new cocoonjs plugin edittime.js, the "jquery.equalheights.js" dependency appears before "jquery-1.8.3.min.js". Just switch them so that it loads jquery first.

    Problem

    Getting JS error:

    ILLEGAL TOKEN (got from "Webstorage_common.js")

    Solution

    common.js in the webstorage plugin of C2 is totally empty, as opposed to other common.js files which has 2 comment lines in them, a thing that causes JS error trying to load an empty file. It's enough to put "//" inside the file to make the error go away.

    Problem

    Getting JS error in the custom launcher:

    "FB is undefined"

    Solution

    I've noticed the latest custom launcher from cocoonjs (2.1 compiler) pops up this error, while the signed apk of 2.0.2 works just fine.

    I've filed a bug with ludei found here: http://support.ludei.com/hc/communities ... onstruct-2

    Feel free to join there as well, if you encounter it also.

    After those fixes, I managed to run the new cocoonJS plugin correctly on my mobiles.

    Hope it helps anyone <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Still happens for me on r187 I don't even have java8 installed...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Aphrodite, however, how is "is overlapping" any different? when I invert it, doesn't it run constantly as well?

    In addition, when I'm on top of the overlapping sprite, the event is not met for some reason... I'm guessing "overlap" means X AND Y overlap?

    Also, if I want to perform an action is the position is less then 200 AND isn't overlapping a sprite, I better of putting the X condition first, right?

  • Problem Description

    Can't invert the "On Collision with Sprite" condition.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/6074572/runner.capx

    Description of Capx

    If Sprite4 (green sprite) collides with an enemy, it can fall behind until it goes off the screen. However, I want it to recover once no collisions are made, up until some point (e.g. run faster than the camera, thus positioning itself towards the center of the screen). Try standing on an enemy's head to fall behind.

    Steps to Reproduce Bug

    • Stand on enemy head to fall behind a bit.
    • Jump off his head to gain speed.
    • Issue is, it gains speed even when it's on the enemy's head, I want it to gain speed only when his not in collision with any enemies...

    Observed Result

    I can't invert the "On Collision with Sprite" to "On Not Collision with Sprite"

    Expected Result

    "On Not Collision with Sprite" should be available

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 8.1 Pro

    Construct 2 Version ID

    R185 64Bit

  • Hey,

    Is there a way of doing something like:

    "On [condition] thisText.setText(return value from [condition]" ?

    Or I must save the return value as an expression and use it later on?

    Thanks

  • If I understand you correctly, that's what I do now. I use JSON.stringify on the object, passing it to construct, and use yann's JSON to get the data I need.

    Alternatively, I have some properties that return a specific property from the JSON.

  • Hey all

    I'm creating a plugin for smartfox server (online engine). Some events return JSON objects I want to transfer to C2, so I stringify it, and "hope" the client has Yann's JSON plugin or any other plugin that converts string to JSON.

    Any way to force my plugin to check for a JSON dependency, or should I just leave it to the user's choice? If he tries to get "Smartfox.config" for example, he'll get a json string...

    Thanks!

  • Thanks all, I'll think about creating a plugin for this

  • rex, so it works both ways? I can use it to call a function on my custom js file (just the I can do with the Browser plugin), and call to the eventsheet function using rex_fncallpkg?

    When you say "rex_fncallpkg plugin", I assume you're talking about c2 plugin used inside c2. how do I use it in my custom js code?

  • rexrainbow, I have to say I couldn't exactly figure out what your extension does or how to use it really... Any chance to simplify it a bit? I'm kinda new to construct 2...

  • So, you recommend just creating a plugin that will create the instance of the smartfox client, and listen to all events, and trigger conditions when relevant?

    It's a hell of a lot of work, it has like 10 or 15 events, about 20 methods I can think of I could use inside the game, not to mention properties...

  • Hey Ashley,

    I want to work with a 3rd party websocket online engine (smartfoxserver) which has a javascript API, and will shoot events to my custom JS code, and in turn I want the game to act accordingly.

    Function and Browser won't be able to achieve this behavior, right? :/

  • Hey all

    I want to create a project which is heavily dependant in external javascript code.

    Can I call an event sheet function from external js code?

    What about vice versa, calling an external js function from construct and receiving return values, for example?

    Thanks!

  • Anyone? please?

  • Hey there

    I want to create a game with lots of custom js code, but when pressing "Run layout" I assume construct generates its code again, so I can't really edit/maintain custom JS file?

    if I call a function from construct, I can only test it after exporting it to html5, and then adding my function in there...