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

Turtles interacting with things using right click

Started by Ninja8370, 16 February 2015 - 07:39 PM
Ninja8370 #1
Posted 16 February 2015 - 08:39 PM
Okay, so I'm wondering if there is a way to make turtles interact with things using "right click". I'm using the LuaLand modpack, and with it there is a "bear trap" device that can trap mobs. I have a melee turtle next to one to kill a mob when it gets caught, but I need the turtle to reset it when it kills the mob. (Breaking and placing will not work as it is placed unset)
I saw a topic a while ago about them being able to interact with levers and buttons, and although that wouldn't be useful, them being able to interact with other things (even vanilla, like doors?) would be nice, especially since mods can add any number of things to interact with.



[attachment=2114:2015-02-16_15.23.47.png]
[attachment=2113:2015-02-16_15.23.12.png]
Edited on 16 February 2015 - 07:41 PM
TyDoesMC #2
Posted 16 February 2015 - 08:50 PM
Turtles can only use right clicking when placing a block, theres no way to make it interact with a mob trap, I looked through the source code of that mod and it checks for player only interaction. basically turtles can't with out a peripheral and that mob trap only allows players to interact with it.

I would use torch levers mod it has auto traps.

You can see if you have the skyblock mod, I forget the name ex nihllo or something like that, they have a block that will interact with things but yet again the code checks for interaction with the player.
SquidDev #3
Posted 16 February 2015 - 09:32 PM
I don't think you can do this. LuaLand doesn't have Thermal Expansion so you have no Autonomous activators, and bear traps can't be controlled with redstone.
Bomb Bloke #4
Posted 16 February 2015 - 09:56 PM
Turtles can control most anything that accepts redstone pulses. For example, stick one under a door and tell it to pulse out its top, and the door should open/close.
Ninja8370 #5
Posted 17 February 2015 - 01:14 AM
Okay, thanks. I can't change any mods since I'm using the LuaLand modpack, but thanks for the info! I guess I'll just have to manually reset the traps :\
Maybe I can make a way for the turtle to broadcast when something get stuck in my trap?
KingofGamesYami #6
Posted 17 February 2015 - 03:25 AM
Presumably turtle.inspect() would return different meta values for open / closed traps. You might try that.
Ninja8370 #7
Posted 17 February 2015 - 12:46 PM
Oh yeah, I just tried a manual redstone on one of the traps and it opens it :D/>/>
So what I'm doing now is building a small program that will attack if it detects a mob in front of it, and if it doesn't it will send out a redstone pulse to open the trap back up. (I need to do it like that so that it does not open it when there is a mob in it …. lol)
Thanks!
Edited on 18 February 2015 - 12:33 AM