Jump to content




Redstone Tutorial!


  • You cannot reply to this topic
4 replies to this topic

#1 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 26 October 2013 - 01:40 PM

Redstone tutorial!
You ever wanted to interact with redstone? Hopefully after this tutorial you can!

So, you want to learn about redstone? Then you are at the right place, because I want to discuss all redstone functions and things you need to know about them.
It is not that hard to do, but for beginners it can be a bit hard.

Prerequisites
To understand anything here, you should know all these things, like in my previous tutorial: Also, take this page from the ComputerCraft Wiki: Redstone

First I want to make clear what an API is. An API is a file full of functions, that we can call externally. With that I mean, we load a file, and we call the functions from that file. We can do that by doing: <fileName>.<functionCall>. Luckily for us, the redstone API is by standard already loaded for you. So you can call functions just like they are on the wiki.

Also, by default you can run a redstone.* function by doing rs.*
So a shorthand for redstone when calling a function is rs!

Now, here is an overview of all the functions and things you will need from the Redstone API.
redstone.getSides()

redstone.getInput( String side )

redstone.getOutput( String side )

redstone.setOutput( String side, Boolean state )

Bundled Cable functions

I have yet to include 3 functions, but I will add those in a future version. Leave some feedback!

Edited by Engineer, 22 January 2014 - 11:00 AM.


#2 TekkitwithRiley

  • Members
  • 12 posts

Posted 01 November 2013 - 03:39 AM

thanks this was really helpful

#3 Vicirga

  • Members
  • 3 posts

Posted 03 November 2013 - 11:48 PM

I have seriously been trying to fix my program all day and this is what fixed it. Thanks so much!!! =)

#4 Sora Firestorm

  • Members
  • 89 posts

Posted 04 November 2013 - 12:09 PM

Nice. One thing I'd change, though, rather than 'RedPower functions', I'd go with 'Bundled Cable functions', so that people know exactly what it's for (just to eliminate confusion) and also that MFRs Rednet cabling also works with these functions. Everything else is fine, though. Good job.

#5 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 22 January 2014 - 11:01 AM

View PostTekkitwithRiley, on 01 November 2013 - 03:39 AM, said:

thanks this was really helpful
Im very glad that it is helpfull!

View PostVicirga, on 03 November 2013 - 11:48 PM, said:

I have seriously been trying to fix my program all day and this is what fixed it. Thanks so much!!! =)
:)

View PostSora the Hedgehog, on 04 November 2013 - 12:09 PM, said:

Nice. One thing I'd change, though, rather than 'RedPower functions', I'd go with 'Bundled Cable functions', so that people know exactly what it's for (just to eliminate confusion) and also that MFRs Rednet cabling also works with these functions. Everything else is fine, though. Good job.
Done, and thanks :D

I forgot to follow this topic, so I didnt see the replies.. Though I see them now!





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users