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

Player Detector

Started by lewisholcombe, 09 March 2013 - 09:18 AM
lewisholcombe #1
Posted 09 March 2013 - 10:18 AM
Is there any way to make it in my startup program it can go 'Welcome (player name)' and detect the player who is on the computer?
SuicidalSTDz #2
Posted 09 March 2013 - 10:46 AM
Is there any way to make it in my startup program it can go 'Welcome (player name)' and detect the player who is on the computer?
They would need to hit the player detector:

while true do
 local event, player = os.pullEvent()
 print("Welcome, "..player)
end
Icabob4 #3
Posted 09 March 2013 - 10:48 AM
Is there any way to make it in my startup program it can go 'Welcome (player name)' and detect the player who is on the computer?
With command blocks, you could sey the gps function for the computer to see where it is, then with a command block function, search for the closest player.
SuicidalSTDz #4
Posted 09 March 2013 - 10:49 AM
What if the player is on a server without command blocks? :P/>
Icabob4 #5
Posted 09 March 2013 - 10:57 AM
What if the player is on a server without command blocks? :P/>
They could just activate them with redstone instead of using the api.
wait…you meant the config for the server not for the api of the blocks. You're right.
SuicidalSTDz #6
Posted 09 March 2013 - 10:59 AM
Say what?

Yes, it would work on a group of players, however, he asked specifically if he could get the name of the person on the computer
LuaEclipser #7
Posted 09 March 2013 - 11:57 AM
No, Not Without input into the computer, like this


print("Whats Your Name? > ")
name = read()
print("Hello"..name)

LMK if you want an explanation
SuicidalSTDz #8
Posted 09 March 2013 - 12:02 PM
No, Not Without input into the computer, like this


print("Whats Your Name? > ")
name = read()
print("Hello"..name)

LMK if you want an explanation
We are talking about the command block (Which I know nothing of)
LuaEclipser #9
Posted 09 March 2013 - 12:21 PM
no, thats for the computer. its a code

No, Not Without input into the computer, like this


print("Whats Your Name? > ")
name = read()
print("Hello"..name)

LMK if you want an explanation
We are talking about the command block (Which I know nothing of)
SuicidalSTDz #10
Posted 09 March 2013 - 12:29 PM
no, thats for the computer. its a code
I'm just going to opt out of this conversation since I have no intentions on arguing any further.