Robinhansen
Did you solve your problem ?
I've just found out that I was wrong
The script I posted will not work properly. Math is OK , but it was a mistake to use getpos command. Getpos will return the height above the _ground_ , not above zero level. To get proper height you have to use ASLheight function or auxiliary trigger/game logic , because they are placed at zero level. I guess , tha's why CoC requires thier obelisk to be on map.
So you should replace
[_playerZ = _playerPos select 2
with [player] call ASLheight
don't forget to preprocess ASLheight .sqf in init.sqs
You will find ASLheight .sqf in function library.