[Plugin] passC2Value

0 favourites
  • 5 posts
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Hi,

    the plugin passC2Value allows you to pass a value from Construct to the parent html-site and vice versa. It's a little tricky and you should'nt be afraid of modifying html-code. <img src="smileys/smiley1.gif" border="0" align="middle">

    example

    plugin

    Example 2 - Calc with javascript with values from C2 <img src="smileys/smiley2.gif" border="0" align="middle">

    Info: The plugin will not do anything in the preview, because in the local preview aren't any for the plugin needed variables - see below.

    Have a look at the Html-Source of the example sites. After exporting your project in Construct2 you have to modify your index.html:

    0) open your index.html with a text-editor (ie: notepad, notepad++)

    1) copy the Html-Source from an example site and paste it in your index.html => save the file

    if ('more than one passC2Value-Plugin used' or 'changed the initial values of the plugin')

       2) modify the variablenames as needed in the file index-html

    (the variablenames are the initialvalues of the Plugin)

    Have fun, Joe7

  • Nice idea actually. I think in theory you could use this for say loading map data, etc.

    Thanks.

    Edit:

    Seems you only have the initial name to call when reading. Might be nice if you could simply rename that or make up new ones at runtime.

  • I think that loading map data is easier with javascript:

    Call Google Map

    Joe7

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi, I want to use passC2Value to retrieve X and Y position coordinates of a sprite in Construct2, and populate fields on the container html with those values. However I don't know how to do that, can somebody please point me towards a good example? This is very important for my game project.

  • Still any idea..?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)