Javascript (Construct 3 Plugins)

  • 57
    This content is deleted
    Extension
    Javascript

    Use 3rd party JS libraries (including JQuery), call Javascript functions, access object properties and methods. Implement game objects, and algorithms in Javasc...

You're viewing a single comment in a conversation. View all the comments
  • 2 Comments

  • Order by
  • when the JS file is loaded is it loaded into global scope? should we wrap, the code an in iffy? what are the best practices when using this plugin?

    • When you add the script with the plugin, it goes to the <head> of the game's webpage with the standard <script src="filename.js">. I'm not sure if it's correct to call that "loaded into global scope". But I think it is what you meant.

      Best practices are:

      — Use third-party libraries

      — Keep construct for event processing, sprite drawing and control logic but have all game objects and their data and logic in javascript so the whole Model part goes to javascript, not Construct: ru.wikipedia.org/wiki/Model-View-Controller