turning off "pf_singleglobal"-flag causes issues

0 favourites
  • 1 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • In a plugin project Im testing, I have a array which I store information in. I create a new instance of a simple function and store them in the array. So the array will have couple of those functions.

    For this I have set the "pf_singleglobal" flag for the project, to avoid creating several instance/objects of my plugin.

    But now I want to move away from the array-list, so instead of one array iteration, I want to have one instance/object instead. So to avoid problems I make it backward compatible, by saving the old functions and make them deprecated, and creating new ones. But when I remove the "pf_singleglobal" flag, the old version with the array-list stops working, while the new functions works as it should.

    I dont get any error messages when starting the project in a browser, it just doesnt work, as if the actions are ignored.

    The array was, and is created in the instanceProto.onCreate function.So it is not a global array. So the really only difference between the new version, which doesnt work, and the old version, is the "pf_singleglobal" flag is turned on/off.

    Does this flag change anything more than "just" making it global inside a project?

  • 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)