64 posts
Location
Denmark
Posted 19 January 2013 - 09:33 AM
Can some one tell me how the Player detector block works?
how do i use the pull event command????
any help would be appreciated =)
2088 posts
Location
South Africa
Posted 19 January 2013 - 10:11 AM
This should most probably be in
Ask a pro or General…
And, take a look
here, which explains how it works.
The block emits an event named 'player' when a player right clicks the block. The player name is then the first parameter of the os.pullEvent()
Example code:
while true do
event, playerName = os.pullEvent("player")
print("Hello " .. playerName)
end
That will print Hello and then the name of the player that clicked on the block
8543 posts
Posted 19 January 2013 - 11:29 AM
Your post in the peripherals section was merged into the MiscPeripherals topic. That is the place you should have been asking, and the place you should be looking for answers. When you have a question about a specific peripheral, ask in that peripheral's topic. If that peripheral's topic is dead, or a couple weeks go by with no answer, then try posting in ask a pro.
Locked.