PC-Logix / OpenSecurity

Security addon for OpenComputers
MIT License
46 stars 24 forks source link

Entity Detector not creating signal. #101

Closed EdTheDog closed 6 years ago

EdTheDog commented 6 years ago

Hello again. Was trying to make a turret with the Energy Turret and the Entity Detector but I have not been getting "entityDetect" signal back or a signal relating to it at all. I made this program to test the Entity Detector but just not getting anything. I also Tried the event.listen("entityDetect") but That didn't do anything either maybe I am just doing something wrong but still wanted to report it just in case.

detect.lua : local d = require("component").os_entdetector d.scanEntities(3) for i=1, 10, 1 do print(event.pull()) end

BTW I put a pig right next to the radar and another on 2 blocks away but again still don't get anything.

EdTheDog commented 6 years ago

Ok Just tried the code with d.scanPlayers and got a signal back. Going to do more research.

EdTheDog commented 6 years ago

Ok, it works for players but It prints the output no matter what. That is annoying. But at least it works for players!

EdTheDog commented 6 years ago

So yeah. scanEntities() does not work. scanPlayers() does but also prints the data out (Which I don't think it should do) Also when it prints the data the X Y and Z are nil but the table returned the X Y and Z are not nil. So... Yeah. :P

EDIT: plus the signal does not return the X Y and Z

EDIT2: Going rafting for the next 5 hours will check but then back can't do more reseach.

EdTheDog commented 6 years ago

Thanks again! :)