Mikal's Recent Forum Activity

  • Right now that's not possible. For now, create a different object for each Spine character and set the specific json and atlas for each object/character. Post a request on the plugin github for this feature and it may get implemented.

    In your code, it will just create a SpineCharacter with properties that are defined for the object (you may need to create a dummy layout sheet with an instance of the Spine object to set the default values - if you are not placing it on the game layout in the editor.)

  • Ashley made some good comments about using await.

    If you need another possibility you could put your code that calls web3 into another script and have it load after the web3.min.js.

    For example, if you create a script called web3Example.js with

    web3Example.js:

    web3 = new web3(new web3.providers.HttpProvider("http://localhost:7545"));
    

    Then your other script would look like:

    runOnStartup(async runtime =>
    
    {
    
    await runtime.assets.loadScripts("web3.min.js", "web3Example.js:");
    
    // This code runs on startup with
    
    // the 'runtime' variable available
    
    });
    
    
  • [It looks like the post I was replying to was deleted, so I hope you already solved the issue]

    I am not exactly sure why you are seeing that error, but I remember a discussion about the order of loading and execution of the script files may be a bit difficult to control.

    construct.net/en/make-games/manuals/construct-3/scripting/using-scripting/script-files

    One simple way around this is to put all your scripts in one big file, but I think one of your files is big and minified.

    So another way to do this is to load the script files in the order you want by putting the files in the Project Files folder and then in the Project Scripts folder use the default script and load them in the order you want:

    runOnStartup(async runtime =>

    {

    runtime.assets.loadScripts("script1.js", "script2.js", "script3.js")

    // This code runs on startup with

    // the 'runtime' variable available

    });

    See: construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/interfaces/iassetmanager

    Interesting project, I also thought about doing something similar with a custom token, I was going to do the token issuing on a Playfab server to have a little more control (e.g. player registration, limits on tokens created, a little authentication, etc.)

  • Likely due to 'worker' mode.

    Project->Properties->Advanced, uncheck 'Use Worker'.

    I am curious, how are you going to use ethereum in your C3 project?

    In the future, you can press F12 (on Windows) to see the console during the preview and there you would have seen that the error was that 'window' was defined, which is an indication that the JS is not compatible to run in a worker (window is not defined in the worker space.) The C3 manual and some of the C3 blogs have details on worker mode.

  • Ah! I remember this! Thanks for doing a new version - it's a great family tradition! Now to go ruin my eyes staring at the screen for way too long, I better turn on NightShift. Well done!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another example of using this nice template. I changed the template over to using JSON with keys as the source, with defaults that will change if the keys are present (the JSON is translated to the template's array on the fly for each line.) Using JSON with keys as a source makes it more readable for me, easier to directly edit the source file.

    Example of the JSON files:

  • Another better solution suggested by Buko-Studios:

    Add a transparent png which covers the required animation space in Spine, this works well with the C3 Spine plugin.

    For example, I added a semi-transparent object as an example so you can see how it works, you can change it so the object is completely transparent (using a fully transparent png.)

    Example:

    sTARKi

  • sTARKi

    I played with your animation in Spine, I have two suggestions:

    - Center your animation around the Spine origin

    - Create small, barely visible objects in Spine to create a bounding box.

    Below is an example using very visible objects (other fish) in Spine. Having them there will create larger bounds for the animation to play out in C3. In your final replace the other fish w/ small objects with a transparent image.

    Spine:

    C3:

  • Example project with atlas, json, png here:

    github.com/gritsenko/c3_spine_plugin

  • Also Playfab

    playfab.com

    There is a paid collection which includes playfab plugins (it does a _lot_ more than just cloud save.)

    constructcollection.com

    I am just a happy user.

  • Another note, now you can call alert() in worker mode in the new C3 beta release!

    construct.net/en/make-games/releases/beta/r194

    See the scripting section of the above post for how to do it (and thanks to Ashley for adding this support!)

  • This is likely because in your project 'worker' mode is enabled and alert() is not supported by a worker.

    Go to your project settings -> Advanced and deselect Use worker.

Mikal's avatar

Mikal

Early Adopter

Member since 22 Apr, 2016

Twitter
Mikal has 112 followers

Trophy Case

  • 9-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x10
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

21/44
How to earn trophies