Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkTargets( Sensor )
- targets = sensors.getAvailableTargetsforProbe(ctrl, Sensor, probe)
- for i,val in ipairs(targets) do
- what,x,y,z = string.match(val,"([a-z]+), (-?[0-9]+), (-?[0-9]+), (-?[0-9])")
- if what == "vq" then
- x,y,z = tonumber(x), tonumber(y), tonumber(z)
- print("Position data recorded")
- sensors.setTarget(ctrl,Sensor,i)
- print("Sensor target set")
- local reading = sensors.getReading(ctrl,Sensor)
- print("Getting reading of player")
- local Name = reading.name
- if string.find("Lying") ~= null then
- LyingPos = vector.new(x,y,z)
- end
- end
- end
Add Comment
Please, Sign In to add comment