This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
unknown1138's profile picture

Place stairs in particular direction

Started by unknown1138, 24 October 2012 - 05:59 PM
unknown1138 #1
Posted 24 October 2012 - 07:59 PM
Hey all,

I've been messing around with wireless turtles a bit and came up with the idea to make house-building programs and ran into some trouble.

The problem is that when I use
turtle.placeDown(turtle.select(2)) --slot 2 = stairs

that the turtle only places the stairs in one particular direction (north I guess).

now I want to know (if it is possible) how to place the stairs in different directions.
I tried it with turning the turtle in a different direction but this makes no difference.

Kind Regards,
unknown1138
OmegaVest #2
Posted 24 October 2012 - 08:04 PM
I'm not sure, but I think down does not work quite right with rotation. Try (if you can) having it face the way you want them to face, and then place it in front of the turtle. I don't know this works, cause I've only really dealt with shells and things, but it might.
unknown1138 #3
Posted 24 October 2012 - 08:16 PM
Well I have tried that, but it didn't work sadly. thanks though ^_^/>/>
Maybe someone else knows how to do this?

I'm not sure, but I think down does not work quite right with rotation. Try (if you can) having it face the way you want them to face, and then place it in front of the turtle. I don't know this works, cause I've only really dealt with shells and things, but it might.

P.S. just a quick side-question, is it possible to "store" a variable so that multiple scripts can see the variable?
I.E. a stand-alone file that contains certains variables that other scripts can read (something like functions)
Ditto8353 #4
Posted 24 October 2012 - 08:28 PM
P.S. just a quick side-question, is it possible to "store" a variable so that multiple scripts can see the variable?
I.E. a stand-alone file that contains certains variables that other scripts can read (something like functions)

Sure is! You can either use rednet to have the different computers/terminals pull the value from a host or use file reading/writing.
However, both will require you to deal with the problem of:
turtle a pulls value
turtle b pulls value
turtle a puts new value back
turtle b is now running off the wrong value...

For future reference, you would want to use e.g. instead of i.e.
i.e. is a clarification or more detail
e.g. is an example
unknown1138 #5
Posted 24 October 2012 - 08:39 PM
@Ditto


turtle a pulls value
turtle b pulls value
turtle a puts new value back
turtle b is now running off the wrong value...

Couldn't this be solved by making the host send a signal through rednet to both turtles (when a value is modified) which checks wether the value is the same as in the host and if there is a difference to force the other turtle to "reboot" with the new value?

For future reference, you would want to use e.g. instead of i.e.
i.e. is a clarification or more detail
e.g. is an example

Didn't know about that, thanks.
Ditto8353 #6
Posted 24 October 2012 - 08:42 PM
Couldn't this be solved by making the host send a signal through rednet to both turtles (when a value is modified) which checks wether the value is the same as in the host and if there is a difference to force the other turtle to "reboot" with the new value?
This is a possible solution. I am sure there are others, but I don't know what would work best for you. It seems like you have a grasp on it though.
Didn't know about that, thanks.
Neither did I, I looked it up yesterday.
unknown1138 #7
Posted 24 October 2012 - 08:53 PM
@Ditto

This is a possible solution. I am sure there are others, but I don't know what would work best for you. It seems like you have a grasp on it though.


Well I'm not really focusing on anything related to this, for now, but knowing this allows me to make some cool stuff ^_^/>/>
Lyqyd #8
Posted 24 October 2012 - 10:45 PM
What version of ComputerCraft are you using?
unknown1138 #9
Posted 25 October 2012 - 12:54 AM
What version of ComputerCraft are you using?

Version 1.3
Lyqyd #10
Posted 25 October 2012 - 04:02 AM
You need to update; this will fix improper stair placement.
remiX #11
Posted 25 October 2012 - 07:08 AM
When is Tekkit going to be updated, sigh >.< Still stuck with cc 1.3