Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grid = {} --51 per 32
- for i = 0, 51 do
- grid[i] = {}
- end
- function reset()
- for i = 0, 51 do
- for e = 0, 32 do
- grid[i][e] = 0
- end
- end
- end
- function check()
- reset()
- tpt.start_getPartIndex()
- while tpt.next_getPartIndex() do
- local index = tpt.getPartIndex()
- if tpt.get_property("type", index) == 18 then
- grid[math.floor(tpt.get_property("x", index) / 51)][math.floor(tpt.get_property("y", index) / 32)] = grid[math.floor(tpt.get_property("x", index) / 51)][math.floor(tpt.get_property("y", index) / 32)] + 1 --I hate this line
- end
- end
- tpt.drawtext(20, 30, "Rad "..tostring(grid[math.floor(tpt.mousex / 51)][math.floor(tpt.mousey / 32)]))
- end
- tpt.register_step(check)
Advertisement
Add Comment
Please, Sign In to add comment