WackyToaster's Forum Posts

  • You call the function after you requested the file via AJAX, but AJAX might take a moment to complete. So you call the function before the arrays are loaded. Put the function fall below "Load from JSON string" inside the On "INV" completed.

  • Well, here´s my attempt. You do have to fake some stuff, and that usually comes with tradeoffs. So if you want a globe just like google earth, you won´t get around using something like threejs. If you are ok with the tradeoffs, you can fake it. Now I don´t know what you intend to create, but if it´s not crucial, you should consider changing it to something that works fine in 2D and doesn´t require too much faking or third party libraries, it will safe you a lot of headaches.

    wackytoaster.at/parachute/globe.c3p

  • I think what you want to do isn´t really all that doable with native construct, since construct is simply not a 3D engine. I mean it is possible with css/javascript, but at that it doesn´t run all that effective.

    codepen.io/edankwan/pen/emqgpr

    The closest solution might actually be what you did

    A layer with a map image, with a Bulge effect, not so high on the scale as quality gets degraded no matter the image resolution; A layer on top with a white circle. "Source in" on the the bottom layer and "Destination in" on the top layer. This "works" to some extent but it never quite feels like a globe when moving it around with the mouse, it just feels like moving a map around inside a circle

    You actually got me curious about that idea, I might give it a shot. I think there might be some tricks I can use (in terms of design/art) to help faciliate a better perception of a globe and not a circle. I´ll post here if I got something. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You gotta upload the image though :) After upload it shows something like

    Copy that ID and insert it like this

    [*img=4127]

    (remove the *)

  • 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

  • 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