dop2000's Recent Forum Activity

  • Oh, I'm terribly sorry, I read your question wrong. I thought you wanted to find this ID for form control objects.

    I'm not sure this is possible for other object types. Maybe you can work around this using C2 callback function. You can call this function from your JS, pass the object type in a parameter, and then in C2 function you pick objects of that type and do something with them (change opacity or whatever). Something like this:

    In JS:
    c2_callFunction('UpdateOpacity', ['sprites']);
    
    In C2:
    Function "UpdateOpacity" 
     Function parameter 0 ="sprites" -> AllSpritesFamily set opacity to 50
    
  • fredriksthlm

    The chooseAsync functions displays "Play with friends" dialog, but friends don't receive any notification or invite to join the game.

    Could you please post an working example (for Construct 3) of how to use updateAsync to actually send an invite message to a friend? Just a simple text like "Can you beat my score?" and a game logo.

    I'm guessing it should be something like "FBInstant.context.chooseAsync() .then(FBInstant.updateAsync.....", but I've spent several hours and couldn't get it working..

    Also, how do you get a Base64 string from a sprite in Construct3?

    Edit: Never mind, I did it!

     
    Browser execute Javascript:
    "FBInstant.context.chooseAsync()
    .then(function () { 
     FBInstant.updateAsync({
     action: 'CUSTOM',
     cta: 'Play it now!',
     image: '" & base64Image & "',
     text: '" & message & "',
     template: 'GAME_TEMPLATE', strategy: 'IMMEDIATE', notification: 'NO_PUSH'}) });"
    

    Instead of encoding a sprite in C3, I used an online tool and simply saved base64 string in a constant variable.

  • You set the ID manually for each such object in layout editor. I don't think you can change or retrieve it with events.

  • Also what would be a more elegant way of doing this:

    CHARM_COLOR set animation frame to CHARM_COLOR.Charm1

  • You can use two Pode's addons - ExtractImage and InjectImage, download them here:

    github.com/Pseudopode/construct2_plugins_behaviors

    Extract image from sprite as Base64 string, save it to local storage. Next time you need it - get it from local storage and inject into the sprite.

  • no, they are not supposed to do that.

    According to the FAQ, "Intent" was added to future-proof the SDK and it will provide user-facing changes in the future

    Also, the information in Scirra's official manual for Instant Games plugin is misleading. It says "Show a dialog to invite, request, challenge or share, in a chat or timeline. The text to use in the share message can be provided."

    This is how it supposed to work, but not how it really works.

  • shareAsync has different intent types (Invite, Challenge etc.) that are supposed to invoke different dialogs, but apparently they don't work yet in current SDK. Also, the message I enter in the "Text" field is not displayed.

    Yeah, I already found the solution with chooseAsync function, it does work. You can't change the message or image, but it's better than nothing.

  • R0J0hound It worked, thanks!

    oosyrag Yeah, typical Scirra :)

  • Is it possible to find the source code of official plugins in C3? I'm guessing they are saved in some browser storage/cache?..

  • I also have a problem with the Invite feature.

    For some reason it opens a simple "post photo" dialog, there is no text, no link to the game, nothing but the picture:

    I tried "Share", "Challenge" and "Request" intents instead of "Invite", and there is no difference, they all show the same dialog.

    Here is my event:

    .

    What I need is this dialog, is it possible to get it? (it's a screenshot from another game)

  • You can't use standard "Array load from JSON" action here, because arrays and dictionaries in Construct require custom JSON format (header).

    That "JSON" object with a yellow icon on your screenshot - is it rex_hash object? In this case I believe you need to remove "Array load from JSON", and instead add a sub-event like this:

    JSON for each key -> Array push JSON.CurValue(JSON.CurKey)

    I never used this plugin, so I may be wrong.

    There is a sample capx on the plugin page, have you tried it?

    rexrainbow.github.io/C2RexDoc/plugins.md/rex_hash.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You never mentioned touch, or slide, or player speed. Are we supposed to read your mind? :)

    Use "Is in touch" event and Touch.SpeedAt(0), Touch.AngleAt(0) expressions to get touch direction and speed of swipe gesture. Based on these values you can decide how to move the character.

    For more accurate swipe gesture recognition you can save initial coordinates in "On touch start" event, and then check how far the finger moved, using distance() expression.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 258 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies