Hello, it is possible to have a single place, where i can write some functions which then i can use from different scripts?
Since now for example, when user win or lost the challenge, (ChallengeWonMessage/ChallengeLostMessage) i'm updating my leaderboards depending on win/loose.
I've write the same code for update the leaderboard for both challengeLostMessage script and challengeWonMessage script. It's better for me to call my custom function, say UpdateLeaderboard(Name, value); which is visible from both scripts.
Some help will be handful here.
Best Answer
C
Customer Support
said
almost 6 years ago
Hi,
Yes a module would suit your needs here. The documentation on modules can be found here. Have a read through that and if you require any further assistance just let us know.
Found, modules. Unfortunately, lack of documentations for this feature.
Customer Support
said
almost 6 years ago
Answer
Hi,
Yes a module would suit your needs here. The documentation on modules can be found here. Have a read through that and if you require any further assistance just let us know.
Old Scheme
Hello, it is possible to have a single place, where i can write some functions which then i can use from different scripts?
Since now for example, when user win or lost the challenge, (ChallengeWonMessage/ChallengeLostMessage) i'm updating my leaderboards depending on win/loose.
I've write the same code for update the leaderboard for both challengeLostMessage script and challengeWonMessage script. It's better for me to call my custom function, say UpdateLeaderboard(Name, value); which is visible from both scripts.
Some help will be handful here.
Hi,
Yes a module would suit your needs here. The documentation on modules can be found here. Have a read through that and if you require any further assistance just let us know.
Regards,
Liam
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstJeff Amiel
Create common functions in modules.
(see modules section here: https://docs.gamesparks.com/documentation/configurator/cloud-code.html)
Old Scheme
Found, modules. Unfortunately, lack of documentations for this feature.
Customer Support
Hi,
Yes a module would suit your needs here. The documentation on modules can be found here. Have a read through that and if you require any further assistance just let us know.
Regards,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics