How do I use abosulte paths in the exported game files?

0 favourites
  • 5 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hello,

    We are using C3 games with a custom-made platform, which bundles the js files in some way.

    In short, we need to change the asset paths in the exported html5 files to use Absolute paths instead of Relative paths.

    Can Construct do that for us?

    Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I doubt C3 can do that. My solution (I've done similar things before) would be to run a find and replace, that might do the trick.

    You'll have to be very careful though so you don't replace something you don't want replaced.

    I usually write myself small batch files to automate such processes where I use this utility with the unfortunate name of fart-it.

    fart-it.sourceforge.net

  • Thank you, I hoped it didn't come to that!

    You'll have to be very careful though so you don't replace something you don't want replaced.

    Could you please give some examples of what I should keep in mind?

    Thanks!

  • Say you replace just the word "images" with "C://project/images" it could also replace the word in, say, a textfile that just happened to use it. Or a function in a script has "images" as part of the name, replacing that obviously breaks the script.

    It's less likely to happen if you do it by hand, but in an automated process it can happen very easily. So if you automate it you'll just have to be careful to pick the right strings to replace and possibly do it file by file rather than all files at once/recursive.

  • Say you replace just the word "images" with "C://project/images" it could also replace the word in, say, a textfile that just happened to use it. Or a function in a script has "images" as part of the name, replacing that obviously breaks the script.

    It's less likely to happen if you do it by hand, but in an automated process it can happen very easily. So if you automate it you'll just have to be careful to pick the right strings to replace and possibly do it file by file rather than all files at once/recursive.

    That is helpful, thank you :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)