WackyToaster's Recent Forum Activity

  • 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).

  • Try Construct 3

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

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

  • This might not be in the latest stable release yet but it's already in the beta.

    editor.construct.net/r387

    The next stable release will (I suspect) drop next week.

  • Is there any way to "lock" this effect ??

    Not that I'm aware of.

    As I said I'd just make sure it looks good in the preview and ignore how it looks in the editor (or disable it in the editor entirely)

  • Some effects depend on the screen size, and the layout view simply has a different size than the actual view in game. You kind of have to ignore how it looks in the editor since what matters is how it looks in the game. Ideally it would look exactly the same but I'm not sure that's possible for some effects.

  • That's also an option, it was the first thing I thought about actually until I realized you can just do it without an invisible pixel.

  • You can check the console (press f12) for a better error message. Imo this message should actually show in the error popup from construct because the error message otherwise is largely meaningless.

  • My solution would probably be to simply not cast the ray from inside the solid at all. Check this

    But there's also the possibility to use solid collision tags

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 25 followers

Connect with WackyToaster

Blogs