[PAID] CanvasSnapshot to global variable

0 favourites
  • 3 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hi!

    I've posted in the help forums, but i'm pretty keen to get everything sorted on my project and as such am happy to pay for someone to help me out.

    I'm using the 'Social' plugin from armaldio which can send emails using Mandrill. There is an ability to also include an attachment, which needs to be in the form of a base64 string in the current version.

    Using System->Take Snapshot and then System->On Canvas Snapshot i'm getting everything to trigger correctly; a screenshot gets taken at the right time (which i'm testing with Browser->Invoke Download so I know that part works! ) and the email plugin successfully sends me an email. The grief i'm having is just the attachment part - what to put in the field for 'Attachment in base64'.

    So far I have been able to get it to send me a few 77B images (which are empty!) and some larger images which are the same pixel dimensions as the ones I get with Browser->Invoke Download but they're also empty.

    So that I can potentially use it later, I thought it would be handy to save the CanvasSnapshot base64 result as a global variable. (there's likely another way to do that, but I know I can use global variables in armaldio's plugin so i'm going running with it!) I read somewhere that there are a few (does 23 sound right?) characters at the beginning of the generated string which are not needed, so I should be removing those before saving the string as a variable - correct me on that if i've misunderstood.

    Hoping someone can guide me in the right direction!

    TLDR: I want to set the base64 string of CanvasSnapshot as a global variable. How could I do this?

    Pay would be via PayPal - PM me a quote!

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To my knowledge Construct 2 can do that pretty easily?

    Set GlobalVariableX as Canvas Snapshot. Then if you need that image, load image from GlobalVariableX.

    Is that what you are after? That works for me anyways!

  • Thanks ! Yeah that's what I did but it was emailing me an 'image' of the same size which was un-openable. Got a reply from the plugin's owner though; in the 'attachment' field I need to put

    tokenat(canvassnapshot, 1, ",")[/code:3li7qib2]
    which sends through everything fine.
    Thanks again for getting back to me.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)