Jump to content




Nice little house [Updated]

turtle

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

#1 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 28 July 2012 - 02:30 PM

Hello!
I've created my first automatic housebuilding turtle and i would like to share it with you. Please critisize me and tell me what i could have done different!
Thanks!

Version 1.2.1 now live at pastebin! - 828NMvf5 -

Changelog.
Spoiler

The house:
Spoiler
Inside (with basement):
Spoiler
Inside (without basement):
Spoiler
Basement:
Spoiler
Code for V1.1
Spoiler
Code for v1.0:
Spoiler


#2 Teraminer

  • New Members
  • 175 posts
  • LocationDon't look behind you..

Posted 28 July 2012 - 02:42 PM

WOW nice job dude.
PS use a spoiler cause you code is toooooooooo big (wich is natural :)/>)

#3 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 28 July 2012 - 02:45 PM

View PostTeraminer, on 28 July 2012 - 02:42 PM, said:

WOW nice job dude.
PS use a spoiler cause you code is toooooooooo big (wich is natural :)/>)
Thank you!
Yeah, i tried to upload a LUA file but the site wouldn't let me... But i'm gonna put it in spoilers now :D/>

#4 Klausar

  • Members
  • 110 posts

Posted 28 July 2012 - 05:25 PM

Could you make a screenshot of the house?

#5 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 04 August 2012 - 11:40 AM

View PostKlausar, on 28 July 2012 - 05:25 PM, said:

Could you make a screenshot of the house?
Done!

#6 Cruor

  • Members
  • 413 posts
  • LocationNorway

Posted 04 August 2012 - 03:57 PM

Just a tip, when you are doing something repetive(like going forward say 2 times and place down a block when you move) you can use a for loop for compacting the code and also making it easier to read.

IE:
for i=1,2 do
    turtle.forward()
    turtle.placeDown()
end
is the same as:

turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.placeDown()


#7 acters124

  • Members
  • 21 posts

Posted 04 August 2012 - 06:27 PM

Nice little house.;)/>
I might make it bigger. xD

View PostCruor, on 04 August 2012 - 03:57 PM, said:

Just a tip, when you are doing something repetive(like going forward say 2 times and place down a block when you move) you can use a for loop for compacting the code and also making it easier to read.

IE:
for i=1,2 do
	turtle.forward()
	turtle.placeDown()
end
is the same as:

turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.placeDown()
I have been looking around for a piece of code that had a for loop because all the for loops didn't work for me. :P/>

#8 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 04 August 2012 - 08:26 PM

View Postacters124, on 04 August 2012 - 06:27 PM, said:

Nice little house. :P/>
Touché!

#9 acters124

  • Members
  • 21 posts

Posted 05 August 2012 - 12:15 AM

I actualy fell in love with the house but I like to be able to make it as big as I want. :P/>
maybe some for loops. xD
you have inspired me to make a house building program. than you. ;)/>

#10 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 05 August 2012 - 10:04 AM

View Postacters124, on 05 August 2012 - 12:15 AM, said:

I actualy fell in love with the house but I like to be able to make it as big as I want. :P/>
maybe some for loops. xD
Well, in the next mayor update I might add some more user friendly customization!

View Postacters124, on 05 August 2012 - 12:15 AM, said:

you have inspired me to make a house building program. than you. :(/>
Im honored! ;)/>

#11 acters124

  • Members
  • 21 posts

Posted 05 August 2012 - 11:44 AM

View PostXhisor, on 05 August 2012 - 10:04 AM, said:

View Postacters124, on 05 August 2012 - 12:15 AM, said:

I actualy fell in love with the house but I like to be able to make it as big as I want. :P/>
maybe some for loops. xD
Well, in the next mayor update I might add some more user friendly customization!

View Postacters124, on 05 August 2012 - 12:15 AM, said:

you have inspired me to make a house building program. than you. :)/>
Im honored! :(/>
mine is much complicated and and simple at the same time. xD(the roof is the complicated part ;)/> (nah I decide against it xD make it simple so users can modify the size))
includes a bed a basement 2 large chests and on top of it all it'll be mah first program! :D/>

#12 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 05 August 2012 - 12:00 PM

View Postacters124, on 05 August 2012 - 12:15 AM, said:

includes a bed a basement 2 large chests and on top of it all it'll be mah first program! :P/>
Huh, when I first did the code you couldn't place beds or doors with the turtle, I've got to check it out!

#13 acters124

  • Members
  • 21 posts

Posted 05 August 2012 - 12:16 PM

View PostXhisor, on 05 August 2012 - 12:00 PM, said:

View Postacters124, on 05 August 2012 - 12:15 AM, said:

includes a bed a basement 2 large chests and on top of it all it'll be mah first program! :P/>
Huh, when I first did the code you couldn't place beds or doors with the turtle, I've got to check it out!
oh yeah a door too!
thanks for reminding. xD
use turtle.place and the door will be facing the turtle.(same as beds I think)

#14 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 05 August 2012 - 12:18 PM

View Postacters124, on 05 August 2012 - 12:16 PM, said:

oh yeah a door too!
thanks for reminding. xD
use turtle.place and the door will be facing the turtle.(same as beds I think)
Damn it! Since I use CC in tekkit I have to wait for the next patch (the current version in tekkit is 1.3)...

#15 acters124

  • Members
  • 21 posts

Posted 05 August 2012 - 12:39 PM

View PostXhisor, on 05 August 2012 - 12:18 PM, said:

View Postacters124, on 05 August 2012 - 12:16 PM, said:

oh yeah a door too!
thanks for reminding. xD
use turtle.place and the door will be facing the turtle.(same as beds I think)
Damn it! Since I use CC in tekkit I have to wait for the next patch (the current version in tekkit is 1.3)...
you sure you cant use turtle.Placeblock()? or similar?

#16 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 05 August 2012 - 12:53 PM

View Postacters124, on 05 August 2012 - 12:39 PM, said:

you sure you cant use turtle.Placeblock()? or similar?
I tried to use both turtle.place() and turtle.placeDown() (when i was one block high) but it just returned false.

#17 acters124

  • Members
  • 21 posts

Posted 05 August 2012 - 02:07 PM

View PostXhisor, on 05 August 2012 - 12:53 PM, said:

View Postacters124, on 05 August 2012 - 12:39 PM, said:

you sure you cant use turtle.Placeblock()? or similar?
I tried to use both turtle.place() and turtle.placeDown() (when i was one block high) but it just returned false.
uhh
I never said it had to be 1 block high. @[email protected]
look:
Posted Image
and me spamming with spawners:
Posted Image

#18 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 05 August 2012 - 03:33 PM

View Postacters124, on 05 August 2012 - 02:07 PM, said:

I never said it had to be 1 block high. @[email protected]
No, but when you use the turte.placeDown() you have to be (atleast) one block high! :P/>
But what version of CC are you using?

#19 acters124

  • Members
  • 21 posts

Posted 05 August 2012 - 08:09 PM

View PostXhisor, on 05 August 2012 - 03:33 PM, said:

View Postacters124, on 05 August 2012 - 02:07 PM, said:

I never said it had to be 1 block high. @[email protected]
No, but when you use the turte.placeDown() you have to be (atleast) one block high! ;)/>
But what version of CC are you using?
1.4.1?
I click adfly link that had the biggest version number! xD

had to stop making the code because I ran into many bugs and it became midnight way to easily. xD

dang roof. xD
well I hit yet another bug. :P/>
easy fix though and then I will move on to the floor with the home stuff(eg chests, torches, door, pie(joke),bed )

#20 Xhisor

  • New Members
  • 37 posts
  • LocationSweden

Posted 05 August 2012 - 09:20 PM

Well , as I said I'm stuck on version 1.3 so I am not able to do that... Yet!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users