Compass Display
easy
Introduction
Sourced by the Bedrock Commands Community (BCC) Discord
Create a compass display on the actionbar using commands.
Commands
BP/functions/wiki/displays/compass.mcfunction
yaml
title @a[rym=157.5,ry=-157.5] actionbar North (N)
title @a[rym=-22.5,ry=22.5] actionbar South (S)
title @a[rym=-112.5,ry=-67.5] actionbar East (E)
title @a[rym=67.5,ry=112.5] actionbar West (W)
title @a[rym=-157.5,ry=-112.5] actionbar Northeast (NE)
title @a[rym=112.5,ry=157.5] actionbar Northwest (NW)
title @a[rym=-67.5,ry=-22.5] actionbar Southeast (SE)
title @a[rym=22.5,ry=67.5] actionbar Southwest (SW)
To understand how rotation selector arguments 'ry' and 'rym' work, refer to this page here.
TIP
You may use the above commands in combination with Crouch Detection or the hasitem selector argument to apply additional conditions in order for the display to activate.