GetDistanceBetween and fromUnit

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

GetDistanceBetween and fromUnit

Post by ElMinotauro »

Hi,

Anybody could say me type of value got from the following sentences ?

GetDistanceBetweenTiles ()
GetDistanceFromUnit ()

Is a integer number?
Is the number of hexagons?
How is it?

Thank you
ElMinotauro
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28273
Joined: Sun Dec 04, 2005 6:25 pm

Re: GetDistanceBetween and fromUnit

Post by rbodleyscott »

It is an integer because the engine only deals with integers, and only does integer arithmetic. All fractions are rounded down.

It is the number of squares, allowing for the extra distance resulting from non-orthogonal direction, but rounded down.
Richard Bodley Scott

Image
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

Re: GetDistanceBetween and fromUnit

Post by ElMinotauro »

Hi,

I am working with a new scenario (nieuport,1600) and I think that these sentencies will be very useful
Thank you for this information

Bye
Post Reply

Return to “Scenario Design”