WackyToaster's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 26 followers

Connect with WackyToaster

Blogs