bartalluyn's Forum Posts

  • Hi,

    first of all I would use On Object Tapped Answer1, not on touching.

    Second, I would use only 1 event, en set the "TimeLeft" variable to this expression :

    TimeLeft >= 51 ? 60 : TimeLeft + 10

    alternatively

    min( TimeLeft+10, 60 )

    Just for your info, I can refer to my Youtube channel where I do things like in my tutorials.

    youtube.com/channel/UCZ6QjvqEs9dR2miRnfFqIpQ

    Hope that helps

  • Add pin behavior to mineral.

    Add instance variable to player. 1 for if he holds a mineral, 0 for if he doesn't. Start with default 0.

    Make a function called "Find" that does this:

    pick random mineral:

    Find path to it.

    Event: Upon path arrival AND player has no mineral.

    PIN mineral to player plus set instance variable to 1.

    Find path to house.

    Other event : Upon path arrival AND player has a mineral (means has found path to house)

    Destroy the mineral and set instance variable to 0

    Call the "Find" function again.

    On start of layout also call "Find" to make it start finding immediately.

    My youtube channel contains some video's you can check out:

    for the pickup and drop off logic :

    youtu.be/4dD_Ajmjwic

    for the path finding logic :

    youtu.be/cf4fwgjAJK0

    Hope you can fit the pieces together

    cheers

  • It's probably got something to do with the condition NextPlatform >= ViewportTop("Layout1"). I would suggest debugging it, maybe just put them on a label on your layout to see what the values are at any given time

  • did you activate unbounded scrolling?

  • You do not have permission to view this post

  • Hi, Save/Load will work, but the disadvantage is that you will save all of the rest too, not just the array/dictionary. Unless you assign the "nosave" behavior to all object types.

    Check my youtube channel, it's filled with examples; for example this one. Where I use save/load, but on top of that also save load a dictionary to local storage. So both systems combined so to speak

    youtu.be/1EEESGQu28M

    A lot of other tutorials load stuff from arrays and dictionaries, so maybe that can help in some way too. check them out

    cheers!

  • can the floodfill demo on my youtube channel work in any way?

    youtube.com/watch

    cheers

  • could you try picking for example the top one inside the overlap check.

    I had the same thing with my solitaire game:

    youtu.be/E1zqEGLeCyI

    Here I can overlap multiple cards as well, and within the "on object clicked", I just pick the top one. I'm guessing that could be the same thing upon overlap here?

    hope this helps?

  • As far as I know there isn't, unless someone else corrects me. But I'm guessing you're asking that because the user can change the contents during the game. I think the way you should look at this, is that the design time info is like a starting point. where you start from when starting off with the game. I think you should use the local storage plugin to save the dictionary/arrays, and on start of layout check: if the item exists in local storage, load it from local storage ELSE load it using ajax from the project file.

    but maybe I don't understand the use case well, so hope it helps?

  • Hi, Does my youtube channel count as a devlog?

    Up to you to decide if it's worth a subscription of course

    cheers!

    youtube.com/channel/UCZ6QjvqEs9dR2miRnfFqIpQ

  • Hi,

    I'm planning to do a video that uses that in the near future, but it's not finished yet.

    What I can tell you is to take a look at one of my other tutorials here:

    youtu.be/rDKwhBwf7Ck

    on a logo quiz, where I do something similar: set an animation frame depending on a condition, It's not stars, but it's letters. The boxes where you can drag the letters to depend on the correct answers, where in your example the stars depend on the user scope. Somewhat similar actually.

    Hope that helps!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would say try a sub event below the "overlapping" event, saying pick top instance for example or pick random instance. It will retain only one.

    I had exactly the same issue with my solitaire game :

    youtu.be/E1zqEGLeCyI

    If I overlap a card, I can only pick the top one. It's handled on object clicked, but same thing I presume with overlapping.

    To increment the score correctly you will probably be best off using a for each loop inside the event as a sub event. But BEFORE you do the pick top instance otherwise you will be left with only one, and the score will increment only 1.

    So on overlap

    for each

    increment 1

    pick top

    do something with top instance

    Let me know if that worked for you.

  • You do not have permission to view this post

  • In this sudoku game I also need to restrict to drop area's, you can check out how it's done.

    youtu.be/Rq0iQGcVQtc

    it doesn't use tilemaps however, but invisible sprites that act as placeholders. May that can be an alternative?

    Hope that helps in any way

  • I would say, start by picking all the objects in range by "pick by evaluate". If you really need the for each (first try without), then you can do that inside the pick by evaluate as a sub event.

    you can check out my tutorial on a city builder game, where for instance, in a certain part of the code I need to asses the capacity of an asset, and I first pick all of the assets that apply using pick by evaluate and then loop through them to call a function for each of them.

    youtu.be/ygTXlrdpma0

    What you should definitely not do is just loop through them, and then evaluate a condition. Always pick. And avoid doing so on every tick, try and do it triggered.

    Hope that helps