Posts by hellii

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.

    So I have some tiles like so, with numbers placed on top of them:

    [3]
    [2]

    I want the 3 to fade in (using an alpha effect). Consider the following code:

    Please login to see this attachment.

    The teal dotted square is the group of tiles - all tiles.

    The 0 is the number, while the orange square is an icon associated with each square.

    Now, the problem lies in that, depending on the order of the tile that I set to appear with alpha, the orange square icon associated with that tile, ALSO fades in, even if the actual tile does not have the value "appearing" set to 1.

    So let's say we have:

    [3] (appear = 1; therefore set to fade in)
    [2] (appear = 0; therefrore not set to fade in)

    The square icon on tile with 2 on it, still fades in - but the NUMBER DOES NOT, as it should. It's just the icon associated with it. So even if the coding's the same, I'm getting this error.

    Logically this doesn't make any sense to me.

    And if I for example do the following instead (swap around the appear values):

    [3] (appear = 0; no fading in)
    [2] (appear = 1; do fade in)

    This will work! Nothing will do a fading animation on tile 3. So it MUST be an ordering problem right?

    Difficult to explain, I hope I made sense and that I can get some help on this.

    Thanks in advance!

    So I've actually encountered the problem of doing too much stuff in one frame... A loop I have that checks every object of a specific group seems to run for very long. How can I split up a "for every object" loop into 2 frames instead of one, so everything will run smoother overall?

    So you're saying the applications for mobile phones actually run multiple frames as opposed to HTML5 applications where it can only run one general loop per frame.

    This actually fits with the experience I've had, where some things ran differently on HTML5 compared to on Android, where I deleted some cells in the same loop, which worked on every platform except for in HTML5.

    Ultimately, I think I will have ~10 groups max at a time. I will only check divisions of groups once a path from start to finish has been made. This can happen multiple times per level, as people attempt to find the solution for grouping the tiles correctly.

    I'm stuck on how to limit this check, but you mention I'll have to make it run the full check on one complete loop (1 frame)?

    Very nice.

    I removed the whole "OR portion" under Test results, as I don't mind if the player groups in Cells like so: A | AA | BBB | CCC

    So let's say the player groups in the Cells like so: A | AA BBB | CCC

    I want the first A to be green (as the A is alone), the AAA BBB to be red (as they are mistakenly grouped together), and CCC to be green as well.

    It looks like it works correctly, ie. it recognizes A | AA | BBB | CCC as SUCCESSFUL. I also got the coloring work as you mentioned, but only if we make it work like "AAA | BBB | CCC", ie. not the "A | AA | BBB | CCC |" way.

    How do I color correctly grouped Cells?

    How would you go about determining which groups are accepted and which are not? I want to give some feedback to the player which groups are valid and which are not so it's easier for him to complete the levels. I've set up a new VAR for each Cell I call "exclusionIsValid", and I want to change the color of the Cells based on this variable.

    I do it for the other Cell mechanics I have in place already, but since the win conditions are determined differently for this mechanic, I'm not sure how to go about this.

    I'm so close to being done with this mechanic, yet so far. :)

    EDIT: Yes I noticed we posted at the same time almost haha;

    It looks like your newest example does exactly what I'm going for. I'm having a little difficulty understanding the flags.

    1) If a cell (group.shifting blocks) has internal flag 0 on, that means it's a cell valid for testing, ie. it will look at the type of all adjacent cells?

    2) And if the internal flag 1 for a cell is on, that means the current cell has already been tested?

    3) What does this do: If type of *shifting blocks* = (current_type of cell detector)+1

    EDIT: I'm trying to merge this example with the current code I have, I'll get back to you how it turns out :)

    So I may have come up with an idea on how to group up tiles together. It's a little hard to explain, but hear me out.

    Consider this path as an example: Please login to see this link.

    We want to do a loop for each tile horizontally and vertically, and count starting from one. If we hit the path, we add 1. If we don't hit the path, we write the same number as before. For clarity, here we do it horizontally for the top row (black numbers): Please login to see this link..

    And here I do it horizontally for ALL rows: Please login to see this link.

    It may look a bit messy and not make much sense what I'm trying to do right now, but it will make sense once we do a loop for each tile vertically. For clarity, first I do it for the left-most column (red numbers): Please login to see this link.

    And here I do it vertically for ALL columns: Please login to see this link.

    So here's where the solution is; all tiles are linked together by their number. Top row tile are linked by both '2' and '1' (Please login to see this link.) but when we get to the right most full column, their top numbers are different, but all bottom numbers are identical - they're all linked together by the '1' (Please login to see this link.). The bottom blue tile on the column (top number 3, bottom number 1) is then linked with all blue tiles to the left of this tile, since they all have '3' as their top number (Please login to see this link.).

    So all these tiles are linked since they have numbers in common.

    After every tile has been numbered like mentioned, I'll have to go through a loop to link them somehow.

    Is this a good solution? What do you think? Is there an easier way?

    Thank you for the detailed response. I'm not really sure how to use this for my specific problem, perhaps you can help me out on getting started?

    Example: Please login to see this link.

    So I want to keep the Alpha tile and Omega tile separate, like I do with that line. I was considering making detectors outward from each of those specific tiles, and test the variable of the tile (if the tile is a part of the line, if empty or if it's another Alpha/Omega type tile). The line the player made above would be accepted and the level completed.

    If the player does this however: Please login to see this link. - the level will fail and the player will have to draw a correct line. So here the Alpha & Omega tiles are connected.

    No arrays are used here as I use detectors for all tile verification. All tiles have variables so it's easy for me to make levels, so I was thinking I'd have to detect variables of each tile radiating outward from each specific Alpha/Omega tile. It's just a problem for me how to do this iteratively without running an infinite loop!

    Any ideas how I can do this? I'm only able to detect tiles just around a tile; I don't know how to keep checking tiles until I reach a Line tile or the border.

    Consider the player draws a path like so, from green circle to red circle:

    Please login to see this link.

    How can I go through each Cell and group the empty Cells together (give the grouped Cells a common value)? In this case make Red/Orange Cells its own group, Blue Cells its own group and Black Cells its own group.

    So I have a grid you can draw on, you basically draw a path however you want on the grid, up, down, left or right. The line will start and stop at specific cells. Some of these cells on the grid have variables on them, for the sake of clarity here there are cells with 1's & 2's. As the player, you have to separate these different cells, so they are separated from each other by the line you draw. Only 1's can be grouped together, and only 2's can be grouped together. If there's a 2 in a section of 1's, the separation has failed by the player.

    I was thinking of achieving this by doing the following (I have no idea how to do this, as you'll end up infinitely checking cells, since you keep checking the same cells):
    For Each Cell with 1 or 2, make a Cell Detector active all around for each touching Cell, testing a Cell's properties. If a Cell touches an empty Cell, do this loop all over again. Continue until all Cells have been grouped up. If a Cell touches a Line Cell or the border, stop.

    I hope this was somewhat clearer? If not I'll try and make something more visual.

    EDIT: Also for 4), levels will have different amount of 1's and 2's, and they will have different locations as well.

    Imagine a grid with cells [], and a line L drawn on the grid. Furthermore, imagine a cell has a var set to 1, and another cell has a var set to 2, like so:

    [1][][][]
    [L][L][L]
    [][][2][]

    I want to make sure cells with var 1 are for themselves, divided by the L from cells with var 2. How do I make each side of the Line its own entity?

    I tried doing a loop for each cell to check surrounding cells, and keep doing this while these cell detectors don't hit the line L, but I'm not sure how to correctly make nested loops in MMF2. The loops I've tried, crashed for me. I think it was because it ran infinitely.

    How do I make nested loops for this particular example?

    Thanks in advance!

    It seems it was an issue with the "run once on event" loop that I put in to fix another problem. I removed it, and the no win condition problem was not seen again. I'm not sure why the previous problem I had is gone now... but that's good I guess. lol

    What I don't get though is why the "run once on event" would cause an issue ONLY if you run the full application and not only the current frame. Confusing.