Jump to content




[MC 1.2.5] - [CC 1.33] ccSensors [SMP/SSP]

peripheral java lua

454 replies to this topic

#361 MadCrayolaz

  • New Members
  • 39 posts

Posted 01 September 2012 - 03:34 AM

Does anyone think they can write a program that basically, the computer receives a players position, and if it is in a certain range, emit a redstone signal? I am unsure how to do this however.

#362 webmilio

  • New Members
  • 1 posts

Posted 02 September 2012 - 02:29 AM

On SMP, all sensors have the same name and they are ALL called Sensor... If you do not see this, simply change the name, disconnect and reconnect, look at the name of the sensor. When using the console program, all of them are called sensor and I've only been able to see one in the list. Am I the only one with this bug?

#363 Falesh

  • Members
  • 9 posts

Posted 02 September 2012 - 10:18 AM

Bug Report

This program when set as a startup program for the computer linked to the Sensor Controller works correctly until I save and exit the world a few times, after which the sensor stops finding targets. The only way I have found to fix this is to destroy the Sensor Controller and Sensor, replace the Sensor Controller and make a new channel with a Blank Transmitter Card and then replace the Sensor using this new Transmitter Card. Old channels seem permanently bugged once this happens.

p.s. thanks for the mod, it's awesome!

#364 matejdro

  • Members
  • 324 posts

Posted 02 September 2012 - 08:28 PM

How can you create private sensors?

#365 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 02 September 2012 - 10:04 PM



#366 montana_1

  • New Members
  • 2 posts

Posted 03 September 2012 - 05:08 AM

can someone help me debug this, those numbers should not come back negative. those four values are the only problem, they are supposed to be the average reactor ticks left from the corresponding item.

Spoiler

FuzzyPurp: I've edited your post. Next time put a long post like that in a spoiler.

#367 mrgreaper

  • Members
  • 88 posts

Posted 04 September 2012 - 08:49 PM

how would i get the data from a sensor next to a reactor in a program

say for example i have two reactors, when one goes dark (ie no eu output) i want the computer to activate the backup reactor (fire a redstone signal at the back of the computer)

so how do i get say a veriable called eureact1 to display the number value of the eu generated by reactor 1 ?

#368 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 05 September 2012 - 03:00 AM

mr

 mrgreaper, on 04 September 2012 - 08:49 PM, said:

how would i get the data from a sensor next to a reactor in a program

say for example i have two reactors, when one goes dark (ie no eu output) i want the computer to activate the backup reactor (fire a redstone signal at the back of the computer)

so how do i get say a veriable called eureact1 to display the number value of the eu generated by reactor 1 ?

Watch the video above

#369 d.hatch75

  • New Members
  • 1 posts

Posted 06 September 2012 - 02:33 AM

I've been following the tutorial here:
but switching the sensor he uses from the world sensor to a proximity sensor, and am having trouble with the getSensorReadingAsDict() function, which doesn't seem to want to work for me at all. I've been on the ComputerCraft wiki and noticed that the function arguments are slightly different to those given in the video, so I rearranged the arguments I passed and still nothing is happening - no reading is made, and no commands after it are performed. I've also tried using the getSensorReadingAsDict2() function in a similar manner, using the arguments described in the wiki page, with just as little luck. Could someone please tell me what's going wrong? In case it isn't obvious, I'm new to LUA, though I have a fair bit of experience with C++ and some Java. I've pasted my code below, thank you for your time:

os.unloadAPI("sensors")
os.loadAPI("/rom/apis/sensors")
function printDict(data)
  for i,v in pairs(data) do
	print(tostring(i).." - "..tostring(v))
  end
end

ctrl = sensors.getController()
-- print("Controller: "..ctrl)
data = sensors.getSensors(ctrl)
-- print("Sensors:")
-- printDict(data)
proxSensor = data[1]
data = sensors.getSensorInfo(ctrl,proxSensor)
-- print("Sensor Info:")
-- printDict(data)
sensors.setSensorRange(ctrl,proxSensor,"5")
-- print("Sensor Range: "..sensors.getSensorInfo(ctrl,proxSensor).SensorRange)
data = sensors.getProbes(ctrl,proxSensor)
-- print("Probes:")
-- printDict(data)
playerProbe = data[2]

data = sensors.getAvailableTargetsforProbe(ctrl,proxSensor,playerProbe)
-- print("Available Targets:")
-- printDict(data)
data = sensors.getSensorReadingAsDict(ctrl,proxSensor,playerTarget,playerProbe)
printDict(data)
print("We have data...apparently...")


#370 Sakata

  • Members
  • 5 posts

Posted 06 September 2012 - 06:17 AM

Is this compatible with 1.41 and SMP?
This would complete the turtles. Don't see why the melee turtle was made if it is blind :D/>
Turtles really should have some form of sensory system like this by default.

#371 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 06 September 2012 - 06:56 AM

 d.hatch75, on 06 September 2012 - 02:33 AM, said:

I've been following the tutorial here - snip - but switching the sensor he uses from the world sensor to a proximity sensor, and am having trouble with the getSensorReadingAsDict() function, which doesn't seem to want to work for me at all. I've been on the ComputerCraft wiki and noticed that the function arguments are slightly different to those given in the video, so I rearranged the arguments I passed and still nothing is happening - no reading is made, and no commands after it are performed. I've also tried using the getSensorReadingAsDict2() function in a similar manner, using the arguments described in the wiki page, with just as little luck. Could someone please tell me what's going wrong? In case it isn't obvious, I'm new to LUA, though I have a fair bit of experience with C++ and some Java. I've pasted my code below, thank you for your time

Those functions are from the ccSensors's API's(the other 'folder' you installed with this mod along with the zip file. Contains the stock apis and lua programs for this addon).

Look in your mods/ccSensors/apis to view those functions :D/>

#372 shivalwolf

  • New Members
  • 4 posts

Posted 08 September 2012 - 01:25 PM

 MadCrayolaz, on 01 September 2012 - 03:34 AM, said:

Does anyone think they can write a program that basically, the computer receives a players position, and if it is in a certain range, emit a redstone signal? I am unsure how to do this however.
]


I have been trying to do this with the proximity sensor.
It seems broken however.
The info shows up if you goto the sensor directly or the sensor controller and you can query the Player probe information.

Can easily probe for targets and get the list of valid targets.
However once querying the target no results come back.

If you want the door to open for any player then you can just check if there's any players close by and use the co-ordinates to work out their distance but thats very messy.
I just hope that the issue with the Player probe and the computer gets fixed.
I cant even find the cause no errors occur which sucks.

#373 matejdro

  • Members
  • 324 posts

Posted 08 September 2012 - 08:48 PM

I have a problem with Forestry sensor, I'm trying to read data from Carpenter.

1. It will not detect nearby carpenter. Instead, it will just list all tile entities nearby

Posted Image

2. Readings are weird

Posted Image

3. It will spam console with errors such as these

2012-09-08 22:37:45 [INFO] [mod_ccSensors] callMethod:2 args[1]:
2012-09-08 22:37:45 [INFO] targetmod:0
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:currentRecipe in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:currentRecipe in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube
2012-09-08 22:37:45 [INFO] Can't find Field:machine in class:TileRedstoneTube

Here is my setup:

Posted Image

#374 moen

  • New Members
  • 1 posts

Posted 10 September 2012 - 04:59 PM

 webmilio, on 02 September 2012 - 02:29 AM, said:

On SMP, all sensors have the same name and they are ALL called Sensor... If you do not see this, simply change the name, disconnect and reconnect, look at the name of the sensor. When using the console program, all of them are called sensor and I've only been able to see one in the list. Am I the only one with this bug?

probably fixed in "mc125 build 017pr2 - fixed: occasional custom sensor names not kept". but for me it's not ocassional, it happens always. I'm using bukkit (still mc 1.2.5), will be the new version ported?

#375 TheBard

  • New Members
  • 1 posts

Posted 12 September 2012 - 04:46 PM

Does anyone have the source code for this mod? Is it still being maintained?
The author has not logged on since Aug 2nd.

#376 n1ghtk1ng

  • Members
  • 58 posts

Posted 14 September 2012 - 08:59 PM

I installed CCSensors and now everytime I try to get on my save I get this error
Spoiler


#377 Maome

  • New Members
  • 12 posts

Posted 17 September 2012 - 02:23 AM

Just a bump hoping for the smp multiple sensor fix. I installed muCkk's b017pr2 port onto my tekkit server and patched the client but I'm still getting exactly the same issue of server restarts reverting sensor names and all sensors showing up as "Sensor" on any attached computers.

#378 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 17 September 2012 - 07:10 AM

 Maome, on 17 September 2012 - 02:23 AM, said:

Just a bump hoping for the smp multiple sensor fix. I installed muCkk's b017pr2 port onto my tekkit server and patched the client but I'm still getting exactly the same issue of server restarts reverting sensor names and all sensors showing up as "Sensor" on any attached computers.

Yes - because it isn't fixed in PR2.

I will fix it when I attempt to port it to Minecraft 1.3.2 - but I'll probably have to get rid of the GUI sensor readings (at least initially) since the code just isn't laid out to have to request that data from a server.

I did have another idea, which was to try creating a replacement from scratch - and perhaps open source it. But that's a big maybe.

#379 Maome

  • New Members
  • 12 posts

Posted 17 September 2012 - 07:15 AM

 Cloudy, on 17 September 2012 - 07:10 AM, said:

 Maome, on 17 September 2012 - 02:23 AM, said:

Just a bump hoping for the smp multiple sensor fix. I installed muCkk's b017pr2 port onto my tekkit server and patched the client but I'm still getting exactly the same issue of server restarts reverting sensor names and all sensors showing up as "Sensor" on any attached computers.

Yes - because it isn't fixed in PR2.

I will fix it when I attempt to port it to Minecraft 1.3.2 - but I'll probably have to get rid of the GUI sensor readings since the code just isn't laid out to have to request that data from a server.

I did have another idea, which was to try creating a replacement from scratch - and perhaps open source it. But that's a big maybe.

Ty for the update! Love the mod, thanks for the hard work!

#380 matejdro

  • Members
  • 324 posts

Posted 17 September 2012 - 08:40 AM

Great to see this mod being picked up. Thanks.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users