AnD4D's Forum Posts

  • Seems odd that this wasn't an issue with Paster in Construct 2. It was able to be rotated, scaled, flipped... anything, and kept on going.

    I'll just have it spawn sprites that slowly fade away over time. Very disappointing.

  • According to https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas if I change the size of my drawing canvas, the next time I paste or draw something onto it, it will clear everything else away.

    Personally I have absolutely no idea why this would be a default behaviour, and it's now leading toward a second game that C3 can't achieve that C2 could do with ease using the Paster plugin (which in my opinion is significantly more superior).

    In any case, does anyone know a way around this? I have it set up so if someone is shot, it will spawn blood, then paste that blood onto the canvas so it's not using hundreds of sprites. However, every time the canvas zooms in, all the blood vanishes.

    The manual suggests that I can "if you clear and re-render the canvas in Every tick"... but it doesn't actually say how. There is no "re-render canvas" action, so I'm sat here scratching my head... yet again.

    I originally thought this was a bug, and reported it as such, but nope... apparently it's by design. Again, I have literally no idea why this would be preferable than... you know, it NOT deleting everything you've created onto the canvas. In fact, I can't think of a single example as to why it would be beneficial to delete everything.

    So yeah, is there a work around, or is it a useless plugin for this and I'm better off just spawning hundreds of blood sprites?

  • That's pretty much what mine does. It's open to everyone, not just my stream. I've had a few people from here make contact with me asking to try it out :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • random (360) for x is most likely different than random(360) for y

    They need to be the same angle even if its a random one.

    Yup, just figured this out from a post of yours from 2 years ago! Thanks for the reply, good to see you again!

  • I keep reading it over and over, and the two looks exactly the same. What makes J1.X different to center.x? Or does making random(360) a variable make a difference?

    I've been trying to figure out how to created a random spawn IN a circle, and this is the closest I've gotten, and I still can't figure it out.

  • I would try urlencode first - it converts commas, &, ?, and all the other symbols to codes that cause trouble in URLs. then urldecode converts them back.

    This has worked perfectly AllanR

    I'm tempted to try the encryption at some point as well, but I'll keep it in my back pocket for a while!

    Thank you so much for your help!

  • Have you tried setting the "Content-Type" header to "application/json" before making the request?

    If you are not doing that, then it must be trying to send as plain text, and then you need to escape certain special characters. But I am just vaguely recalling all of this, so it might not be accurate.

    It seems to have a problem submitting commas. It posts the word just after the comma, then stops. I'll try the ecryption approach. Kinda makes sense for stored data to be encrypted anyway. Hopefully Construct gets an official plugin soon.

    have you tried "urlencode" before sending the text? you will then need to urldecode in php on the other end.

    I have not. I will do that if the encryption plugin fails :D

  • No, but I will try that asap and then get back to you!

  • Hey DiegoM

    As an example, it's basically a series of JSON codes embedded into a single JSON.

    {"c2dictionary":true,"data":{"MiniWidth":480,"MiniHeight":280,"MiniX":1440,"MiniY":800,"ModData":"{\"c2dictionary\":true,\"data\":{\"and4d\":0,\"challacc\":0}}","GiveawayData":"{\"c2dictionary\":true,\"data\":{\"MaxEntries\":100,\"Word\":\"! \"}}","CounterData":"{\"c2array\":true,\"size\":[0,2,1],\"data\":[]}","StoreData":"{\"c2array\":true!comma!\"size\":[1!comma!3!comma!1]!comma!\"data\":[[[\"Scribble \"]!comma![\"ScribblePlus\"]!comma![\"50\"]]]}"}}

    This is then uploaded via AJAX, calling a php file which stores it into a database.

    If any section of the data includes a comma, it breaks the json (which makes sense), yet if I use certain symbols it breaks the upload, and it never reaches the database.

    I'm currently in the process of testing an encryption plugin, but I always hate using non-official plugins in Construct 3.

  • I note that whenever I submit an AJAX to website (to store data, such as leaderboards) there are occasions where I was unable to actually upload anything.

    I asked this question over a year ago to a deadly silence, but hopefully someone can help out this time...

    https://www.construct.net/en/forum/construct-2/general-discussion-17/ajax-post-limit-143358

    After some investigation, it seems that the problems come when I post anything that includes a symbol, such as & or #. This blocks the upload of data entirely!

    I'm able to get around this by using the replace action, that replaces the symbols with words. For example, # becomes !hash! and & becomes !and! (apparently ! is not an issue).

    However, I'm worried that I will end up missing a symbol somewhere along the line, especially with there being dozens of them.

    Can anyone think of a clever way of encrypting the data that's uploaded (that is ajax/php safe) then decrypting it when Construct downloads it again?

  • Due to the way Twitch secures things, it doesn't like one site talking to another, which means any program that is hosted in the cloud can't get certain info. If I made a local version, I'd be able to grab that data without issue.

    The work around I found is that most local chatbots will post a message, such as "Thanks for the 10 bits!" into the chat. So my cloud bot will scan for such a sentence, then can trigger events based on seeing that message appear.

    Unless I misunderstood what you meant.

  • I stream from time to time, but not to do it as a job. I do it to meet people and test out the code, primarily :D

  • You stream russpuppy?

    If you want to try it out, you can check out what it can do by visiting https://www.challacc.com

  • I was trying to share the code for quite a while, but it had the word "TwitchCraft" in the title, and Scirra kept rejecting it because the word Twitch is copyrighted, even though that's not how copyright laws work XD

  • Hi russpuppy

    Yes, I'm able to get all of that working. It's pretty insane what I've been able to achieve slapping Construct and Twitch together :D

    The fact we can now make Twitch extensions just opens up so many more doors when combined with the multiplayer plugin :)