WackyToaster's Forum Posts

  • Yeah I've tried it myself and it happens every time. It does sound somewhat unintended but then again the objects technically do get destroyed when the layout changes so yeah.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's also the platform info plugin which could help here. That's what I'm using, although it does warn that it is not a surefire way.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/platform-info

    But pair that with an additional check like so (that's the scirra recommended method)

    editor.construct.net

    And it should probably cover like 99% of the cases.

  • The more involved solution would be to use the itch.io api.

    itch.io/docs/api/serverside

    Specifically

    itch.io/api/1/KEY/game/GAME_ID/download_keys

    You can use this API call to verify that someone has a valid download key to download the game.

    I don't think it needs any 3rd party addons. You can just send AJAX requests and validate the results.

  • Not much different. You just don't put the odds as a global variable and instead use an instance variable that you then compare/subtract from/...

  • Not quite. Try it like this. Odds start out at 100% so the first click will always result in success. After 10 clicks the odds are at 0% so a click will always result in failure.

    Think of it like a dice roll. You need a 6 which means the odds are at ~16.67%. You roll the dice, if it lands on 6 it's success (1) if it lands on anything else it's fail (0)

  • Interesting, I've never noticed this.

    How exactly do you call for the layout transition? If it's also within js, it should be easy to do by removing the event listener before transitioning. Or worst case, briefly muting all audio.

    But it is a little bit odd that the object destroyed triggers when the layout changes, although it also makes sense in a way.

  • Yeah, although in this case it has little to do with a timeline. I'd prefer it if it was not tied to the whole animation editor stuff and would just be an object in the layout instead, but that's a different story.

  • Check this out

    editor.construct.net

  • I have to admit that doesn't say much, and the js files are obfuscated of course. Does it not say anything else before or after this?

    Also maybe try emptying browser cache if you haven't already, sometimes that causes weird issues.

    And also what you can try: Since you can open the project in an older version, try deleting larger chunks of the project (make a backup!) and see if any of that fixes the problem. You might be able to narrow down a certain resource or folder that is causing the issue.

  • Put the odds in a variable that you decrease every click.

  • Again, the results always come out as 0 or 1 when the variable is set to Random(100)<50

    That is exactly how it's supposed to work.

    Also how can you set something as true or false when the variable isn't a Boolean?

    A boolean is in essence just a 1 (true) or 0 (false).

    Your code is wrong because you already do the comparison in random(100)<50

    And then compare the result of the comparison again with <50. Either you do

    Set Odds to random(100)

    Odds <50 / Odds >50

    OR

    Set Odds to random(100)<50

    Odds = 0 / else

  • This is an evaluation

    Basically it means "Is the value generated by random(100) less than 50?" and it's either true (1) or false (0).

  • Exactly, you have to pass a timestamp into the function. This also allows you to get a month from the past or the future if you pass a timestamp into it that's not the current time.

  • I don't think you should be using Browser.ExecJS to do this. Instead use the date plugin

    construct.net/en/make-games/manuals/construct-3/plugin-reference/date

    Which has this

    GetMonth(timeStamp)

    Extract the month (0 - 11) from the provided timestamp in local time.

    So April would return 3 and all you have to do is add one

    GetMonth(timeStamp)+1

  • Tilemap object doesn't have a check for overlap, so you'll have to work around that. It depends a little on what you are looking for. You can try "for each tile -> pick overlapping point" Or if you compare with another tilemap, compare the tiles.

    But can I suggest something because I've seen you work on this project for a while. I think all of this should be driven by arrays instead of tilemaps. No doubt this is a great learning experience either way, but I've been in a very similar position before where I was kinda checking for overlaps etc. which was honestly a bit of a nightmare not only to code in the first place, but also to maintain. In the end it SOMEHOW worked (I have no idea how even lmao) but realistically arrays will be your savior. I wouldn't necessarily suggest reworking everything now but keep it in mind for maybe the next project :)