Skip to content

Latest commit

 

History

History
14 lines (14 loc) · 325 Bytes

Others.md

File metadata and controls

14 lines (14 loc) · 325 Bytes

Find player when right click

local clickedPlayer
for i, v in ipairs(worldObjects) do
  local movingObjects = v:getSquare():getMovingObjects()
  for i = 0, movingObjects:size() - 1 do
    local o = movingObjects:get(i)
    if instanceof(o, "IsoPlayer") then
      clickedPlayer = o
      break
    end
  end
end