[Construct 2] Little functional Google play plugin

Can you add any expressions to Google play plugin in construct? if you can:

  • get player last name
  • get player id (The most imortant thing for all games)
  • get player image url
    Thanks in advance

I will assume you refer to this plugin: https://github.com/ludei/Construct-2-plugin

Is it right?

Yes, it right. I want addition to this plugin

You can do it by yourself :slight_smile: .

It is an open source plugin and the internal code is only calling to our plugins.

You just need to add some variables and use this expression: http://doc.ludei.com/3.0.5/Cocoon.Social.html#toc12

As you can see, everything you were asking for is there in just four lines.


I dont know javascipt :confused:

Can you give me details how do it? :blush:

I am sorry but we can’t afford to keep on adding new features to those plugins. However, if someone in C2 community want to contribute and pull that update to the repository, we will be glad to include it.

Unfortunately, our priority now is the new cloud and the new plugins. Sorry for the inconvenience.

Sure :slight_smile:

You can take as example the new plugins. The code is really similar but it is more clear and easy to read: https://github.com/CocoonIO/cocoon-plugins-c2

You need to create new expressions in the edittime, one for each feature you want to add.

For example, like this one in the InApps plugin:

AddExpression(7, ef_return_string, "", "In-App Purchases", "PurchaseProductId", "Returns the product id of the last purchased item.");

In the runtime you need to add the call to the plugins:

For example:

Exps.prototype.PlayerScore = function(ret) {

In your case it will be something like:

Exps.prototype.UserID = function(ret) {

And you should get this information calling this method: getLoggedInUser()


I recommend you to check if the user is logged in first.

And then, after saving, it is time for testing :smile:
When everything is working as it should, you can make the pull request :wink:

Good luck :smile:


Edit: You might need these links