GetAngleFrom(me, enemy)

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

GetAngleFrom(me, enemy)

Post by enric »

Hi Pip,

//get the angle the enemy is presenting to my position, 0=looking straight at me, 180=I am directly behind them
GetAngleFrom(me, enemy);

But I receive values like:
-5580
-990
1170

??
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: GetAngleFrom(me, enemy)

Post by pipfromslitherine »

Hmmmm - let me look into it.

Cheers

Pip
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: GetAngleFrom(me, enemy)

Post by pipfromslitherine »

Thanks for reporting this! :) There was a bug caused by the update to fixed point maths with these functions. This is now fixed and will be part of the next update (though not sure if it will make it into the EXE for the first beta version).

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: GetAngleFrom(me, enemy)

Post by enric »

Many unit actions scripts use this.
FIRE_AP, FIRE_HE, COMNATTOOLS, MORALETOOLS, AI,…
Post Reply

Return to “Battle Academy : Modders Corner ”