How do I create a Global Function ?

0 favourites
  • 7 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • I create a function in an event Sheet and on the next layout, I want to call that function again.

    The Function Intellisense dropdown list list the function, so I select it, but I soon realize it is not being called at all.

    Why list the function there if it is not available in the event sheet and only available in the event sheet it was declared in ?

    Can I make a function global ?

  • Create a Main event sheet.

    Now include an eventsheet called variables (make it and put all your variables there)

    Now include a eventsheet called functions (make it and put all your functions in there)

    Now include a eventsheet called changelog (make it and put all you changes via comments in there) etc etc.

    you can make groups that have eventsheets included.

    The purpose is to have a main eventsheet that pulls in code from everywhere else.

    One new eventsheets you can then include main eventsheet or something like that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I have done that, now, how do I attach more than one event sheet with a layout ?

    One specific to the layout and one containing all the global functions for the layout to use ?

  • how do I attach more than one event sheet with a layout ?

    You might include an event sheet into another. Check the "Include event sheet" option.

  • Right click the event sheet and choose "Include event Sheet"

  • Include Event Sheet is the best invention since Static function in the coding world !


  • Library imports have been around almost since the beginning of computer science, lol.


    The earliest programming concepts analogous to libraries were intended to separate data definitions from the program implementation. JOVIAL brought the "COMPOOL" (Communication Pool) concept to popular attention in 1959, although it adopted the idea from the large-system SAGE software. Following the computer science principles of separation of concerns and information hiding, "Comm Pool's purpose was to permit the sharing of System Data among many programs by providing a centralized data description."

    I wasn't alive then though. :-p

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