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

[1.53/1.6] - Name tags for turtles (like player names but for turtles)

Started by Wiesdendarm, 02 April 2013 - 01:34 AM
Wiesdendarm #1
Posted 02 April 2013 - 03:34 AM
Alright so i my idea is name tags for turtles they act like player names but they float above a turtle.
I'm not sure if this is possible but im sure there is a way to it.

My idea is to set a few commands like:
- turtle.showName(Name of the turtle or a variable) –If there is no name entered and there is a label it will show the label of the turtle (there should be a limit of letters and/or numbers you can show)
- turtle.hideName() –Simple will hide the name
- turtle.getName(variable) –will get the name it is showing and store it in a variable
- turtle.getNameFront(variable) –saves the turtle's name in the front of the turtle that using the command and storing it on a variable (can be used to give information from one turtle to another)
- turtle.getNameDown – does the same thing as front but checks under the turtle
- turtle.getNameUp – same thing but up

I think this is all of it but keep in mind that this is only for turtles because computers having a name would look a bit weird.

Some things that can be used with this:
- adventure maps (shops and stuff)
- showing information without having to open the turtle
- turtle mini games (health bar?)
- for fun

Also here's a picture for the idea:
Spoiler

Thanks for reading and have a nice day!

-Wies

EDIT: added a picture
FuuuAInfiniteLoop(F.A.I.L) #2
Posted 02 April 2013 - 06:18 AM
Alright so i my idea is name tags for turtles they act like player names but they float above a turtle.
I'm not sure if this is possible but im sure there is a way to it.
-snip-
- turtle.getName(variable) –will get the name it is showing and store it in a variable
- turtle.getNameFront(variable) –saves the turtle's name in the front of the turtle that using the command and storing it on a variable (can be used to give information from one turtle to another)
-snip-
Why we must pass a varible where we want to store the variable if we can use return.(and the funciton will not know what is the variable name)
Wiesdendarm #3
Posted 02 April 2013 - 06:59 AM
Why we must pass a varible where we want to store the variable if we can use return.(and the funciton will not know what is the variable name)
I'm sorry maybe i mis-understand you but with "variable" i mean a variable like m wich you could use in print(m) so that the name can be printed or any other thing.

-Wies
theoriginalbit #4
Posted 02 April 2013 - 07:03 AM
I'm sorry maybe i mis-understand you but with "variable" i mean a variable like m wich you could use in print(m) so that the name can be printed or any other thing.

-Wies
I think he means that it should be

variable = turtle.getName()

in any case a suggestion similar to this one was posted a week or so ago, and rejected… can't remember why though…
Wiesdendarm #5
Posted 02 April 2013 - 07:43 AM
I think he means that it should be

variable = turtle.getName()
Yes that is possible too.

in any case a suggestion similar to this one was posted a week or so ago, and rejected… can't remember why though…
Really i cant find the post but too bad that it was rejected.. oh well
theoriginalbit #6
Posted 02 April 2013 - 07:48 AM
I think he means that it should be

variable = turtle.getName()
Yes that is possible too.
well actually

variable = turtle.getName()
is the only possible way.

this way

turtle.getName(variable)
would not work. well there is one way, but don't want to confuse. :P/>
Sammich Lord #7
Posted 02 April 2013 - 07:58 AM
IIRC, this has been suggested before. Can't remember what the Mighty Cloud said about it though.
Cloudy #8
Posted 02 April 2013 - 08:01 AM
Eh, I'm not 100% against this idea. A config option with capability to switch it on/off in game with a key combination for each client would be feasible.
Wiesdendarm #9
Posted 02 April 2013 - 08:12 AM
I'm sorry i havent been in coding alot lately and my head likes to forget stuff i just had this idea thats all.
Cloudy #10
Posted 02 April 2013 - 08:15 AM
FYI this was the other thread: http://www.computercraft.info/forums2/index.php?/topic/11224-turtle-name-tags/page__view__getnewpost