It reads the positions of any players on or over the floor, and prints their name and height, at their current position. It uses the Sensor Block from OpenPeripherals.
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
I Made This Today (Sensor Block Is Cool)
Started by Tinyboss, 17 September 2013 - 08:42 PMPosted 17 September 2013 - 10:42 PM
Posting in General because the code is still too ugly to share. But I guess you could come on my server and steal it if you really have to have it.
It reads the positions of any players on or over the floor, and prints their name and height, at their current position. It uses the Sensor Block from OpenPeripherals.
It reads the positions of any players on or over the floor, and prints their name and height, at their current position. It uses the Sensor Block from OpenPeripherals.
Posted 17 September 2013 - 11:02 PM
oooh nice, does it have proper math when finding the exact X and Y of the character on the screen?
Posted 17 September 2013 - 11:04 PM
Looks cool! I've never looked into openPeripherals so I don't know how advanced this stuff is, but I can see some fun applications for your program :D/>
Posted 18 September 2013 - 01:11 AM
the sensor block is actually from OpenCCSensors not OpenPeripheral
Posted 18 September 2013 - 10:18 PM
Sort of proper. It does an affine transformation to get from world to screen coords (that sounds proper, right?), but I used trial and error to get the coefficients, so it won't work for different screen sizes, screen orientations, text scales, or sensor locations. I'm currently working on a touchscreen-style calibration routine (stand on this X, now stand on that X) that can work for any random assortment of sensors and monitors. I've got the sensor part mostly done.oooh nice, does it have proper math when finding the exact X and Y of the character on the screen?
Well, maybe that's where OpenPeripheral got it, but I don't have OpenCCSensors installed, so…the sensor block is actually from OpenCCSensors not OpenPeripheral
Posted 18 September 2013 - 10:38 PM
Awesome! It's reminds me of this:
(It's called 'The Map', it's in an exhibit called OurSpace at Te Pa Pa (the national museum of New Zealand))
http://www.tepapa.govt.nz/whatson/exhibitions/pages/ourspace.aspx#map
Basically, when you walk over part is displays little bits about where you are standing.
(It's called 'The Map', it's in an exhibit called OurSpace at Te Pa Pa (the national museum of New Zealand))
http://www.tepapa.govt.nz/whatson/exhibitions/pages/ourspace.aspx#map
Basically, when you walk over part is displays little bits about where you are standing.
Posted 19 September 2013 - 01:06 AM
Very, very cool! Have you played around with text scale on the monitor yet? You may be able to dive into some cooler things with that, who knows.
I was thinking of doing something like this at a later stage when we get a "monitor_touch" event for walking. I was also thinking that whole, lines on the floor thing leading to places like in army bases in movies would be cool :)/> Touch the line and it tells you where it goes.
I was thinking of doing something like this at a later stage when we get a "monitor_touch" event for walking. I was also thinking that whole, lines on the floor thing leading to places like in army bases in movies would be cool :)/> Touch the line and it tells you where it goes.
Actually OCS is officially no longer supported and will no longer be developed. The sensor (as it was known in OCS) has been absorbed into OpenPeripheral as the sensor block.the sensor block is actually from OpenCCSensors not OpenPeripheral
Posted 19 September 2013 - 02:27 AM
I was thinking of doing something like this at a later stage when we get a "monitor_touch" event for walking.
Sounds awesome, is it confirmed?
Posted 19 September 2013 - 06:17 AM
It is planned: http://www.computercraft.info/forums2/index.php?/topic/14378-new-event-monitor-walk/I was thinking of doing something like this at a later stage when we get a "monitor_touch" event for walking.
Sounds awesome, is it confirmed?
Posted 19 September 2013 - 09:18 PM
Sensor Block be a cool Sensor Block
Posted 20 September 2013 - 06:29 AM
Posted 03 October 2013 - 06:45 AM
Plus, this is on Tinyboss's server. Go on it and test it out!