GetUnitFacing

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

GetUnitFacing

Post by enric »

facing = GetUnitFacing(me);

This call used on a Soviet Infantry gives values like:
90 ( the only comprensible)
52
15
324
269
etc
I understand that 15 means 0 and 52 means 45, but …

Used on a SU-122, for example, gives the correct angle: 0, 45, 90, etc.

A little light, please :D
pipfromslitherine
Site Admin
Site Admin
Posts: 9881
Joined: Wed Mar 23, 2005 10:35 pm

Re: GetUnitFacing

Post by pipfromslitherine »

Hmmm - it could be that the units are facing in different directions because of how they are bunched? Hmmm - wierd though. All units go through the same code. How does the unit actually look?

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: GetUnitFacing

Post by enric »

They are both standard units of BA2 ( no modified)

soviet_rifle
SU-122
pipfromslitherine
Site Admin
Site Admin
Posts: 9881
Joined: Wed Mar 23, 2005 10:35 pm

Re: GetUnitFacing

Post by pipfromslitherine »

I mean, when you have them adjacent, does the infantry point in another direction?

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: GetUnitFacing

Post by enric »

No, in a perceptible way.
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: GetUnitFacing

Post by enric »

Just rotating the same unit
Attachments
Screen Shot 2015-09-01 at 16.20.16.jpg
Screen Shot 2015-09-01 at 16.20.16.jpg (129.92 KiB) Viewed 2528 times
pipfromslitherine
Site Admin
Site Admin
Posts: 9881
Joined: Wed Mar 23, 2005 10:35 pm

Re: GetUnitFacing

Post by pipfromslitherine »

I will have to dig into it. Not sure what is going on! My guess is that the first man (which is the one it always uses for multi-man units) is being offset, perhaps for aesthetic reasons.

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: GetUnitFacing

Post by enric »

The bizarre is that the same unit facing sometimes gives, for example 5 or 6, and 180 or 174.
Post Reply

Return to “Battle Academy 2: Modders Corner”