by Kidpaddle45
Create a compass on-screen and have it point in a direction based on your target's position on map. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Kidpaddle45.Compas##version=0

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:


Latest Version
Date added: Oct 6 2013
Last updated: Oct 9 2013
16 fans

Requires BYOND V.500+

Can be used freely, no credits required. (Knowing where it's used would be cool!)

Just like in MMORPGs:


HSP: (Jan 2 2020, 9:56 pm)
Works fine for my game. Thanks kid!
I gave credits.

(This is AERProductions for Pondera).
PopLava: (Feb 27 2019, 7:25 pm)
FYI: Compass isn't moving in latest version of BYOND.
Kaiochao: (Oct 22 2013, 9:00 am)
I was being nitpicky and referring to turn(Icon, Angle). My mistake.

I forgot turn() is used for matrices too, ever since I started using matrix(Angle, MATRIX_ROTATE).
Airjoe: (Oct 22 2013, 8:54 am)
I'm not so familiar with all this new stuff, but how is BYOND's built-in `turn` procedure not used in the call to `animate`? Or are you just being nitpicky and acting as if "BYOND's `turn`" only refers to `turn(Dir, Angle)` and not also to `turn(Matrix, Angle)`? I thought it was pretty clear what I was asking.
Kaiochao: (Oct 22 2013, 8:44 am)
Neither BYOND's turn() nor icon.Turn() are used in this example, although I'm not sure if they round their angles.

I remember Lummox claiming that matrix rotation (which is used in this example), unlike icon.Turn(), does support floats. They don't need to be in [0, 360), either.