Posted 08 December 2015 - 08:13 PM
With the update of Peripherals++ and the now disabled Google TTS thing the speaker won't speak and the Minecraft Nuclear control Computercraft based PA system does not work now the modder has advised programmers to use the synthesize() command however i did that and the speaker still won't speak, this is the coding i have
can anyone help me with getting this up and running again?
speaker=peripheral.wrap("right")
local speaking = false
local red = true
while true do
while red or speaking do --#while we are waiting for redstone or the speaker to finish
local event = os.pullEvent() --#pull an event
if event == "speechComplete" then --#if the speaker stopped speaking
speaking = false --#we are no longer waiting for it to finish
elseif event == "redstone" then --#if a redstone change occured
red = false --#we are no longer waiting for redstone
end
end
local input = rs.getBundledInput("back")
speaking = true --#we're now waiting for it to speak
red = true --#and for a redstone change to occur
if colors.test(input,colors.red) then
speaker.synthesize("Reactor Critical! Reactor critical! Meltdown Imminent")
elseif colors.test(input,colors.pink) then
speaker.synthesize("Danger! Reactor heat level Critical! Evacuate all none essential Personnel!")
elseif colors.test(input,colors.green) then
speaker.synthesize("Danger! Reactor Heat level at 6000 Degrees!")
elseif colors.test(input,colors.yellow) then
speaker.synthesize("Warning! Reactor Heat Level above Acceptable limit!")
elseif colors.test(input,colors.blue) then
speaker.synthesize("Caution! reactor Heat level at 4000 degrees!")
elseif colors.test(input,colors.magenta) then
speaker.synthesize("Caution! Reactor Heat above Normal Level!")
elseif colors.test(input,colors.orange) then
speaker.synthesize("Attention! Reactor Heat Level at 2000 degrees")
elseif colors.test(input,colors.white) then
speaker.synthesize("attention, Reactor heat level increase detected")
else
speaking = false --#we aren't waiting if it didn't speak, this is probably not needed but I like to program for any situation.
end
end
as many of you will recognise this is the old PA system coding that you guys helped me with and with the update the speak command is now Depricated as the modder sayscan anyone help me with getting this up and running again?
Edited on 08 December 2015 - 09:46 PM