Can we link Layer Grid Graphs?

H Aron,

I just got the pro version and noticed that I cannot link layered grid graphs… I have a situation where I need a unit to go to another level above but there are no stairs ecc… I am using triggers to change his Y position.

I can do this with the normal graphs and by having multiple ones and connect them with each other but the layered grid graph does not support node links or at least that’s the error i get which would save me ton of work if it did!

I read in another post that the code can be modified to adapt to the layered grid graph and that its simple to do but can you please explain what I need to modify exactly?

Thanks

1 Like

Hi

Sorry for the late answer.

You would need to modify the LevelGridNode class to add a “connections” array, check the PointNode class and the GridNode class for how they do it. The AddConnection, RemoveConnection, Open, GetConnections and similar methods would need to be tweaked as well to use the new connections. The grid nodes do this, so you should be able to look at that code.

1 Like

Thanks Aron, Will try this! I know you are busy mate :slight_smile:

Hi Aron,

Just to let you know that this worked and I added nodes. Just want to know if you plan to add this in a next update as I do not want to avoid future updates cause of this.

I am sure you will agree that the implementation is not that hard once you figure out the classes and how they work and I am surprised as to why the layered grid graph did not have it as its the most graph that would make sense implementing them than the rest.

1 Like

Is this possible now? I am using the latest beta.

Hi

Yes, the AddConnection/ RemoveConnection and similar work for the LevelGridNode too.