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

[1.3] Get person's username

Started by Hawk777, 09 March 2012 - 03:32 AM
Hawk777 #1
Posted 09 March 2012 - 04:32 AM
It would be neat if there were a way to get the (Minecraft) username of the person interacting with a console (since multiple people can presumably right-click on a console at the same time, perhaps this could be hung off something like "key" and "char" events, indicating who typed the key.
Sebra #2
Posted 09 March 2012 - 04:52 AM
What happens now when multiple people right-click on a console at the same time?
Advert #3
Posted 09 March 2012 - 10:32 AM
This is hard to do; multiple people can access the same computer at the same time.

When multiple people use a computer, their input is combined, e.g if person A typed "hello ", and person B typed "world!", the computer's screen might look like this:

CraftOS 1.3
> hello world!
Sebra #4
Posted 09 March 2012 - 10:40 AM
so both persons will see "hello world!" ?
Hawk777 #5
Posted 09 March 2012 - 12:07 PM
That's why I suggested doing this at the event level. Sure, one person might type "hello" and one might type "world", but each individual "key" or "char" event will come from only one person.
Advert #6
Posted 09 March 2012 - 12:45 PM
That sounds like magic, though :/

I don't think Dan would approve.
Jan #7
Posted 09 March 2012 - 04:27 PM
Maybe a fingerprint/iris-scan device?
commands in the peripheral api:
"on" - The device starts flashing, so the user sees it is ready, and he can put his finger on it.
"off" - Put the device off
"get" - Returns the latest fingerprint taken (fingerprint is the name of player, or the checksum of the name)
passinglurker #8
Posted 09 March 2012 - 05:30 PM
if this is going to be like the crafting table problem then i'm going to keep my computers out of reach in a locked room
coolblockj #9
Posted 09 March 2012 - 11:16 PM
I agree with this idea and Jan, i would love to have like a scanner for my code doors and such on multiplayer!