Can't get script dependency to work - addon sdk v1

Not favoritedFavorited Favorited 0 favourites
  • 1 posts
From the Asset Store
Endless Runner V1 - very positive, joyful, energetic track with upbeat mood and dance club rhythmic beat!
  • Hi all!

    I'm trying to add a script dependency to my addon. I'm using the addon sdk1 for now.

    Following the manual, these are the steps I took:

    1. Added the dependency script in \c3runtime folder
    2. Specified the dependency in the behavior info using this._info.AddFileDependency
    3. Specified the script file in "file-list" inside addon.json

    If I try to call a function from the script, I get an error saying that the function is not defined. However, a console.log inside the script shows up on the browser console, meaning that the script at least is loaded.

    Is there anything I'm doing wrong? (I'm using developer mode btw)

    This is how I add the dependency in behavior.js

    this._info.AddFileDependency(
     {
     filename: "c3runtime/voronoi.js",
     type: "inline-script"
     });
    

    In "file-list" I added "c3runtime/voronoi.js"

    And this is the script i'm tring to use (calling new Voronoi()):

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)