Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isLookingAt(uid, target)
- local var = {
- [0] = "x",
- [1] = "y",
- [2] = "x",
- [3] = "y",
- }
- local look = getCreatureLookDirection(uid)
- local pos_a, pos_b = getThingPos(uid), getThingPos(target)
- if math.abs(look - getCreatureLookDirection(itemEx.uid)) == 2 and pos_a[var[look]] == pos_b[var[look]] then
- return true
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment