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

Cc (1.5) Turtle Issue

Started by bluefoxy, 30 October 2013 - 03:10 AM
bluefoxy #1
Posted 30 October 2013 - 04:10 AM
so like i have this diggin script and i cant figure out how to make the turtle empty its self when its full minus the SLOT1 (fuel)
it mines very well, but wont empty when its full as in go to the starting point and put things in to the chest behind it were it started then go back to work andy help wwoudl be wonderful

NOTE: i didnt add anything on the empty, then go back to work part as i dont know how to implant it

http://turtlescripts.com/file/gjdgxt
Bomb Bloke #2
Posted 30 October 2013 - 05:51 AM
You neglected to include the script. You're not talking about this one, are you?
bluefoxy #3
Posted 30 October 2013 - 12:09 PM
You neglected to include the script. You're not talking about this one, are you?
nope its http://turtlescripts.com/file/gjdgxt
Bomb Bloke #4
Posted 30 October 2013 - 05:22 PM
The usual methodology is to have an occasional check to see whether the last slot(s) of the turtle contain items (using turtle.getItemCount()). If so, you'd have it return to base, ensure it's facing the chest you've left there (typically you'd place that behind the turtle's starting location), then loop through all slots calling turtle.drop() as it goes.

I recommend you plop a turtle down in front of a chest, manually fill its inventory, then produce a script that'll dump off everything its carrying. Once you've done that, you can add that new script as a function to the script you wish to modify.