How to setup rule to check if all actor paths overlap or touch with each other?

games4fungames4fun Member Posts: 185
edited July 2014 in Working with GS (Mac)

Hi Everyone,

I am trying to make a rule that can check to see if 6 different actors paths overlap or touch with each other in any way.

Example,

Actor Path 1 overlaps or touches with

Actor Path 2, 3, 4, 5, or 6

Then if it overlaps lets say actor Path 4
Then have the rule check to see if actor path 4 overlaps with or touches

Actor Path 2, 3, 5, or 6

Then so on and so forth until all paths are connected. If however lets say actor path 4 doesn't connect with any of those other paths then go back and check if actor path 2 overlaps with either path 5 or 6 and then continue till finished.

What would be the best way to approach this rule. Any ideas?

Thanks

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    What is an actor path? I mean, I think I can guess but what does it mean in this context? Are the actors all moving at the same time and drawing lines while they move and then you want to know if the lines overlap when they've stopped moving? Or do you need it to check if any actors have ever crossed a line/spot where another actor has been?

    If you can provide any context, it would be very helpful (e.g. "I'm trying to draw a star" or "This game is similar to snake").

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • games4fungames4fun Member Posts: 185

    Actor Path is just Actor i guess you can say. The actors don't move they get spawned into different locations and I want to create a rule that will know when they actors are spawned if they all overlap "connect" in some way.

    Ex Actor 1 overlapping with one of the other 5 actors and then that actor overlapping another till all have been linked. Though Actor 1 doesn't need to overlap with every actor just 1 and that actor another. Hopefully that makes more sense.

  • ArmellineArmelline Member, PRO Posts: 5,369

    So it doesn't matter which actor overlaps with which other actor, you're just wanting to find out if they all connect?

    Or do they need to "chain"? That is, actor 1 overlapping with actor 2, actor two overlapping with actor 5, actor 5 overlapping with actor 3, etc.?

    I guess I'm asking, if you placed them all on top of each other would that count, or is it only 2 overlaps allowed per actor?

  • games4fungames4fun Member Posts: 185

    They would need to chain connect. Actor 1 can overlap with one, a few, or all 5 of the other actors and and then depending on what Actor it overlaps with then that actor needs to overlap with a different actor until it verifies all 6 actors are chain connected.

    If they all were all placed on top of each other that would work but they will never all spawn that way.

Sign In or Register to comment.