Hi, i'm preparing project for the platform and adding their SDK with ads.
I'm working with the C2 runtime and features of the c3 runtime are not available for me with this project.
The thing i can't handle is to get function from their api.
The question is : How to get this function that happens in the Console and then to run action inside Construct?
->From the Construct i'm Executing JS with the function 'showAds'
-> then ads is showing
- > after the ads Complete i can see the function 'adsComplete' in the Console
-> then i need to run the action in the Construct, after this^ function.
As i know it can be done from the index.html with c2_callFunction, but i don't know the coding.
I'm hoping anyone know the solution!
Develop games in your browser. Powerful, performant & highly capable.
Yeah, you need to find the function 'adsComplete' in the parent html or in the lib you are using, and insert this code into it:
Then create "OnAdsComplete" function in the event sheet.
Thanks! But it it possible to write this function in the index HTML? Since main sdk file is downloading from server, i don't have such file in my folders.
You need to check SDK documentation, maybe they provide some API. If this SDK is a single JS file, you can also try downloading it and including into your project, then you should be able to insert your function call.