Jump to content

Boostermedia


sandy234
 Share

Recommended Posts

It's pretty simple . Create an extension and call it "BoosterAPI.js" (for example) , In the js file include all the functions you want , The file should look similar to this:

 

//BoosterAPI.jsfunction UpdateBoosterScore(gainedScore){   try {       var scoreObj = {scoreValue:gainedScore};            BM_API.getHighscores().submitHighscores([scoreObj]);   } catch (e) {       console.log("BOOSTERMEDIA_SUBMITSCORE not implemented. Gained score is: {gainedScore}");   }}//the other functions

 

Add a new function , let external name be UpdateBoosterScore , and name whatever you want , I prefer to have the external and ingame name the same thing, so I just let it be UpdateBoosterScore. Add one argument to the function and let be "double"

 

In the event whenever you gain score in game maker , call the function you've added , and pass the current score to the function in the first argument.

//gmlscore+=1;UpdateBoosterScore(score);
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...