showRoute

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

showRoute

Post by enric »

When you choose a tile to move the selected unit, the route the unit will follow is showed.
Is there a way to get the array of tiles, from origin to destination?
pipfromslitherine
Site Admin
Site Admin
Posts: 9923
Joined: Wed Mar 23, 2005 10:35 pm

Re: showRoute

Post by pipfromslitherine »

Take a look at the GetCheckRouteLength and related functions.

Cheers

Pip
follow me on Twitter here
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: showRoute

Post by enric »

Thank you.

I see that the problem was not on how to obtain the path but how to know when a unit as really finished its move.

I'd like to trigger an action when a unit has finished its move, for example moving another units that also may trigger another action when finished.

I tried AddVizWaitOnMove(me) but don't works as expected.

Can you give me some light?
pipfromslitherine
Site Admin
Site Admin
Posts: 9923
Joined: Wed Mar 23, 2005 10:35 pm

Re: showRoute

Post by pipfromslitherine »

AddVizWaitOnMove is (IIRC) the only way to do it - you would need to stack up everything you wanted to do in the viz queue to make good use of it. There is also IsUnitMoving, but I am not sure how robust it is.

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “Battle Academy 2: Modders Corner”