How do I execute a function from a separate sheet?

Get help using Construct 2

Post » Thu Dec 24, 2015 2:16 pm

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. :shock:

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.
B
3
Posts: 2
Reputation: 179

Post » Thu Dec 24, 2015 2:25 pm

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.
B
24
S
3
G
1
Posts: 432
Reputation: 2,127

Post » Thu Dec 24, 2015 2:33 pm

Thanks a lot! Working now!
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], NN81 and 3 guests