This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Player Detector
Started by lewisholcombe, 09 March 2013 - 09:18 AMPosted 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?
Posted 09 March 2013 - 10:46 AM
They would need to hit the player detector: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?
while true do
local event, player = os.pullEvent()
print("Welcome, "..player)
end
Posted 09 March 2013 - 10:48 AM
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.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?
Posted 09 March 2013 - 10:49 AM
What if the player is on a server without command blocks? :P/>
Posted 09 March 2013 - 10:57 AM
What if the player is on a server without command blocks? :P/>
wait…you meant the config for the server not for the api of the blocks. You're right.
Posted 09 March 2013 - 10:59 AM
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
Posted 09 March 2013 - 11:57 AM
No, Not Without input into the computer, like this
LMK if you want an explanation
print("Whats Your Name? > ")
name = read()
print("Hello"..name)
LMK if you want an explanation
Posted 09 March 2013 - 12:02 PM
We are talking about the command block (Which I know nothing of)No, Not Without input into the computer, like thisprint("Whats Your Name? > ") name = read() print("Hello"..name)
LMK if you want an explanation
Posted 09 March 2013 - 12:21 PM
no, thats for the computer. its a code
We are talking about the command block (Which I know nothing of)No, Not Without input into the computer, like thisprint("Whats Your Name? > ") name = read() print("Hello"..name)
LMK if you want an explanation
Posted 09 March 2013 - 12:29 PM
I'm just going to opt out of this conversation since I have no intentions on arguing any further.no, thats for the computer. its a code