User Tag List

Results 1 to 8 of 8

Thread: Logic fail when trying to scope between instances

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2012
    Posts
    239
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Logic fail when trying to scope between instances

    I'm trying to make a jewel drop style game that slides diagonally with Easing Object and it works all good when I check against obstacle qualifier. However when I add another qualifier to check against (the one from the jewels themselves so they sit on top of each other) the scope totally fails. I've been on this for a couple days but my logic seems to be failing to detect where exactly is the problem. I just can't see it. It looks like it should from my current knowledge. Any of the the brighter minds would care to give me a hand? It would totally make my day.
    The code is separated in two groups. The "Working" is working fine but only stops at the "B" (Obstacle)
    The deactivated group is where the problem is. It's the same code but with the attempt to include the jewel's qualifier.

    Thanks in advance



    Tokenslide_witheasing.mfa

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    662
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    The group that isn't working has these problems:

    1. You delete objects without scoping for them - checkdiagright / left and down - so it deletes all of them - and some are still being used by other objects.
    2. The Easing Object - has object stopped moving fails - I don't know why.

    I can overcome both these - I've amended your example to:

    1. Not destroy objects unless they're part of the scoping
    2. Change the Easing Object to: is object moving - negated

    This works correctly but creates a forever loop that never ends.
    The solution I could think of was to set a value every time the object is checked and to stop the loop when that value reaches 13 (because your grid has 13 blocks).
    It's also necessary to destroy all other objects of the same qualifier that aren't in the frame because they will never reach 13 and the loop will continue forever* (you had some on the side, that were created at start - but not in the frame.)

    *the loop continued until 1000 objects were created then stopped because it had reached the maximum number of objects.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2012
    Posts
    239
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    The group that isn't working has these problems:

    1. You delete objects without scoping for them - checkdiagright / left and down - so it deletes all of them - and some are still being used by other objects.
    2. The Easing Object - has object stopped moving fails - I don't know why.

    I can overcome both these - I've amended your example to:

    1. Not destroy objects unless they're part of the scoping
    2. Change the Easing Object to: is object moving - negated

    This works correctly but creates a forever loop that never ends.
    The solution I could think of was to set a value every time the object is checked and to stop the loop when that value reaches 13 (because your grid has 13 blocks).
    It's also necessary to destroy all other objects of the same qualifier that aren't in the frame because they will never reach 13 and the loop will continue forever* (you had some on the side, that were created at start - but not in the frame.)

    *the loop continued until 1000 objects were created then stopped because it had reached the maximum number of objects.
    Thanks Janette5 for your effort, really appreciated.
    I have the feeling that this is much more complicated than I have imagined at first.

    From your example sometimes the down decides to not work.
    2020-02-11 08_39_41-Animated GIF - Find & Share on GIPHY.jpg
    GIF
    https://giphy.com/gifs/L0SsowHBfmlrI6gD1x

    Two pieces overlapping each other from the side. It seems I have not anticipated this
    2020-02-11 08_39_15-Animated GIF - Find & Share on GIPHY.jpg
    https://giphy.com/gifs/KzWVyLBl5qJ038C8Ei

    The detector from diagonal left doesn't recognize the Group.Shifting Blocks
    https://giphy.com/gifs/ZFix83c0n03DeDvcm4

    2020-02-11 08_38_10-Animated GIF - Find & Share on GIPHY.jpg

    I think what could be missing is assigning Fixed ID to the detector. The engine might be confused due to the detectors and the group.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    662
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    There are a couple of tutorials floating around for sliding blocks and sliding puzzle games that move the block a few pixels at a time until it reaches an exact position - then repeats.

    Something like that might work better for you then using the easing object.

    The one tutorial is - https://lizardking.co/arch_clickteam...ortby=category - scroll down to brick connect game

    I had modified the down movement from that example so that after they can't move down - they can move left - and I guess you could similarly test right - which would give you the diagonal movement. It just might give you a different idea of getting to your desired result.

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2012
    Posts
    239
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    There are a couple of tutorials floating around for sliding blocks and sliding puzzle games that move the block a few pixels at a time until it reaches an exact position - then repeats.

    Something like that might work better for you then using the easing object.

    The one tutorial is - https://lizardking.co/arch_clickteam...ortby=category - scroll down to brick connect game

    I had modified the down movement from that example so that after they can't move down - they can move left - and I guess you could similarly test right - which would give you the diagonal movement. It just might give you a different idea of getting to your desired result.
    Hi Janette, thanks. I've searched for all board game/falling tokens/match-3 examples under the sun, including with and without AGBO.


    In fact, the example you pointed out is one of the best. I was using this brick connect from him as starting point, and it works perfectly. However the loop is constantly checking down and even if I manage to stop the check down while checking or moving diagonally I'll still have problem to make it slide perfectly -60 or +60. That's why I thought about go with Move it object.

    Googling around I found out that this kind of thing might be much more complex than I anticipated because it's not just a matter of diagonal slide but also avoid token overlapping.

    https://www.reddit.com/r/gamedev/com...g_in_a_match3/


    https://i.imgur.com/VrLLa1U.gif

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    662
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I noticed now - playing around with it - that some of your tokens have the hot spot set as centre of mass - which is not the centre of the block. This is going to make a lot of things fail - they need to be fully centre in the bounding box so that they line up correctly on the grid.

    Attached is something I tried - just with the green triangle. It might give you some ideas.

    It will always move down - when it can't - it checks left - when it can't - it checks right.

    It's going to fail when there's an option to move left and right - because it will move left first, then move right, then again move left and get stuck there forever doing that. I don't have a solution for this one except to layout the board in a way that it can't happen.
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2012
    Posts
    239
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    I noticed now - playing around with it - that some of your tokens have the hot spot set as centre of mass - which is not the centre of the block. This is going to make a lot of things fail - they need to be fully centre in the bounding box so that they line up correctly on the grid.

    Attached is something I tried - just with the green triangle. It might give you some ideas.

    It will always move down - when it can't - it checks left - when it can't - it checks right.

    It's going to fail when there's an option to move left and right - because it will move left first, then move right, then again move left and get stuck there forever doing that. I don't have a solution for this one except to layout the board in a way that it can't happen.
    Thanks Janette, yes that's a nice example using a bounce ball movement. I don't think I remember seeing bouncing ball done right in grid style before. The movement kinda reminds me of water particles. It will spread over until it finds no obstacle/boundaries.
    About the center of Mass you're right, I noticed that yesterday, it really break the things in the grid. I'll see what I can do.. I'll keep at it.. maybe I can find a solution.... Thanks

  8. #8
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2012
    Posts
    239
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Alright, looks like I got it working nice for one token. Still not 100% sure why things get messy when I more objects are involved...
    Attached files Attached files

Similar Threads

  1. Can Object Scope Fail?
    By Sunonymous in forum Fusion 2.5
    Replies: 4
    Last Post: 6th October 2016, 07:40 PM
  2. Replies: 3
    Last Post: 18th May 2015, 07:16 PM
  3. Help with events and logic for similar instances
    By loglady in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 13th August 2013, 02:00 AM
  4. What is the Logic Behind This? (negate object overlapping "logic")
    By Blue66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 10th January 2012, 11:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •