How do I execute a function from a separate sheet?

0 favourites
  • 3 posts
From the Asset Store
- This pack is suitable for shooting games, running games, platform games, and side-scrolling...
  • I wrote some functions and put them in a separate sheet to keep code clear. I added that sheet and named it: "Function Sheet".

    In this sheet there is a function with the name: "MyFunctionA" which should set a certain string on a defined text object. (Just for a simple check if the function is executed.)

    MyFunctionA is called in the event sheet - But it is NOT executed.

    I wrote a function MyFunctionB on the event sheet - doing the same: setting a certain string on the same defined text object and call it alternatively by the same event in the event sheet. This function is executed as expected.

    What is the problem with MyFunctionA on the separate sheet?

    Thanks in advance for helping.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make a right click in the event sheet where you want to execute your functions and choose 'include event sheet'.

    Then add your event sheet with your functions.

  • Thanks a lot! Working now!

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