WackyToaster's Forum Posts

  • Hmm, ohhh I misread that a little, instead of using "for each X element" use "for each X,Y element". If that doesn´t solve it... hard to tell what´s wrong without seeing the rest of the code/project.

  • The custom movement behavior has a "push out of solid". What´s exactly the case? Slow push out/instant push out, is it supposed to overlap in the first place or do you want to prevent that completely?

  • Possible, yeah. But it´s one hell of a task, if you don´t have a dedicated team and already good knowledge about construct/networking I´d steer away from that idea.

  • If your bushes are not too close together, it´s probably easiest to use "pick nearest (bush)" and pick the bush that is closest to the fruit collected.

    Another possibility is to check "if bush is overlapping fruit" when the fruit is collected.

    Both are not that precise but should work in most cases. If you need to be precise, you can add an instance variable to the flower/fruit and store the bushes UID in them. When the fruit is collected, use "pick by UID (bush)"

  • There´s two options

    Local notifications

    You can schedule a local notification to be delivered whenever. If you know that in 2 weeks something happens, you can do just that. The thing is though you need to know the duration beforehand. This should work well for games where you build something and it takes X hours to build.

    Push notifications

    You have a server that sends these out when needed. So you can say, when a player does his turn, you can send a notification to his opponent. The duration doesn´t matter in that case.

    Afaik you don´t need a server for local notifications since they are stored on the users device. For push notifications there are various services like onesignal. Either way I´m not sure how exactly they work and if there are working plugins available.

  • That should do the trick

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the event sheet

    Button on created > Button - Set CSS

  • Your best bet is your own server, say if you have your website hosted somewhere. There you put a file that does nothing but generate that timestamp and you request that file with AJAX from your app. Should even be doable with some free hosting services.

    For the file you can use php or js, it�s pretty easy to find it on google.

  • System has the unixtime expression, so simply typing unixtime will return that.

    There's also a plugin that I made. construct.net/make-games/addons/97/utc-time

    It's basically the same with some extras. In your case you probably won't need them tho.

    Don't forget that the device time can be changed to cheat. If you want to avoid that you have to get the timestamp from a server.

  • Arrays are not the easiest thing to work with, but once you understand how they work they can get really useful.

    [quote:2469aufe]Would you mind explaining this please:

    variable > array.width - 1

    Set variable to 0

    So the variable is used to define where you are currently at inside the array. However, arrays use zero-based indexes, aka. the first value is stored on 0, not on 1. What the check does (assume the array has a width of 10):

    IF the variable is bigger than the array.width - 1 --> set variable to 0[/code:2469aufe]
    We need the -1 on the array width, else we would allow the variable to increase up to 10, and array.At(10) would return nothing, since the array has stored the values on 0-9. What this ends up doing is that it will loop back to the first item once you reach the last item.
    
    [quote:2469aufe]Do you know how I can use the array.At expression to point the return value to a specific line on the array, say the second or third row?
    
    array.At(X,Y,Z) --> array.At(0,2) will return the value on the 3rd row.
    X = columns
    Y = rows
    Z = depth (3d arrays)
  • Use array.At(X,Y,Z)

    If you have the names stored on x just do Array.At(variable) and every time the button is clicked, increase variable by 1. At the end just make sure that the variable loops back to 0 or stops increasing once you reach the end of the array.

    variable > array.width - 1

    Set variable to 0

  • we have no idea how it even happened? Especially if it appears to be some sort of "cosmic-ray hit the cpu at the wrong angle" kind of crash that you cannot reproduce.

    As a sidenote: Wouldn´t a log of some sort help with debugging since it would include the steps up until the crash? At least the final X steps, I more often than not have a rather fuzzy memory of what I actually did just before the crash happened.

  • You could try the javascript addon.

  • Do you mean this?