SetUnitTurnToFace

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

SetUnitTurnToFace

Post by enric »

For example, I add some random units as reinforcements, and I want the units are placed facing to a tile in the center of the map. As the added units will come from a random edge of the map, I found that this functions (SetUnitTurnToFace(id, 27, 23)) puts the units facing to the tile, BUT, if it's a tank the turret is not facing to the center.

How can a move the turret so it's facing the same facing that the unit?.
I see several functions to GET the turret angle or facing but not to move it.
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Re: SetUnitTurnToFace

Post by pipfromslitherine »

You might be right, we might need a function specifically for the turret facing. Although, could you use AddVizUnitTurnToFire to point the turret to the correct point?

Cheers

Pip
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: SetUnitTurnToFace

Post by enric »

Thank you, this seems to work.
Post Reply

Return to “Battle Academy : Modders Corner ”