Advertisement

Author Topic: SPON_directionName (ACCEPTED)  (Read 1698 times)

0 Members and 1 Guest are viewing this topic.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
SPON_directionName (ACCEPTED)
« on: 16 Oct 2007, 21:38:21 »
SPON_directionName v0.1.0
- Released: 2007-10-16
- SQF function in a single file
- Includes demo mission

Works out the name (e.g. "North North-West") or abbreviated name (e.g. "NNW") of a compass direction given a value in degrees (clockwise from North, as returned from getDir) or a vector (as returned from vectorDir, wind or weaponDirection). The user can specify how many possible directions to take the names from: 4 (N, E, W, S), 8 (adding NE, etc), 16 (adding NNE, etc) or 32 (adding NEbE, etc).

Credits
Based on a small part of a script by [seven]

ChangeLog
v0.1.1 - Correctly accepts degree values outside range of 0-359.
v0.1.0 - First release at OFPEC.
« Last Edit: 27 Oct 2007, 16:01:42 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON_directionName (READY)
« Reply #1 on: 16 Oct 2007, 23:15:07 »
Mandoble pointed out that the function should accept angles outside of the range 0-359. I'll fix that in the next version.

*** EDIT ***
Updated with the suggested fix.
« Last Edit: 17 Oct 2007, 00:04:48 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: SPON_directionName (READY)
« Reply #2 on: 24 Oct 2007, 00:35:48 »
I just demo'd this, looks good  :good:  Accepted!