Shape painter object Advanced: How To

Hello, I would like to start a new game where units could move from province to province via linked lines. (paths all traced)
I searched in examples and on the forum but I found nothing except from the old Topics to make a set of trains where they used the Automatism behavior.
Unless I’m mistaken, I don’t see this behavior in GD5, there is a Shape painter object that has advanced actions, to create a path? No doc or example and I can’t use it… Is there someone who could help me to use it?

You will tell me: Use Pathfinding!
I answer that it is not necessary to collide and would ask me to make full masks of collisions in each province whereas it is just necessary to follow lines as if the units were magnetized above.
And then to take the shortest route, add up the length of the desired start to finish lines to suggest the fastest route.

Thanks for reading :wink:
This is a French to English translation.

Hello, unfortunately the answer is not going to be a simple/the answer you might like to hear.

The shape painter is an object that created painted shapes. You will have one shape painter object that stays static in one position, and paints many visual shapes via your event.

These painted shapes are not accessible via event logic, and they are just for display/visuals only.

You can definitely use the shape painter to make the visual lines you want, however you will still need to use pathfinding or other events to make your other objects actually move. You would also need to track the start and stop points of your painted shapes separately in order for your objects to be able to move between them.

Thank you for the quick reply !
So not possible to redo as before with “automatisms”?

Sadly I can’t answer that as I don’t know what that is. GD4 was over half a decade ago and a different technology entirely, so I’m not sure what it may have used or had available.

Ok thank you :wink: I’m good at doing obstacles…
If anyone has an idea to simplify, please do.

There was a post where someone was trying to make a train follow a path, and someone linked an in-development extension that allows it. It might be worth checking into: