Good evening at all, someone could explain how to use digilines and player detectors?
I want the Lua controller to ask the player detector which players are nearby. These player names should then be sent from the Lua controller to a lcd display and shown there.
This is my code so far:
if event.type == "on" then
digiline_send("scanname", "GET")
end
if event.type == "digiline" then
digiline_send("lcd", event.msg)
end
The code works great with the node detector, but with the player detector the "GET" is always written into the field for which player is being searched and nothing arrives on the lcd display.
Does anyone have any ideas?
Thanks in advance
player detector and digiline
Re: player detector and digiline
Ich habe das gleiche Problem, möchte gern am LUA Controller den Player Detector auslesen. So funktioniert es auch nicht:
if event.type == "program" then
person = " "
end
if event.type == "on" then
if pin.b then
digiline_send("111","get")
port.c = not port.c
end
if event.type =="digiline" then
person = event.msg
print(person)
end
end
Kann uns bitte jemand helfen? Was muss geändert werden?
Wie smomk8d schon geschrieben, das "get" (egal, ob groß oder klein geschrieben), landet im Feld, wo die Namen der zu entdeckenden Spieler steht!
if event.type == "program" then
person = " "
end
if event.type == "on" then
if pin.b then
digiline_send("111","get")
port.c = not port.c
end
if event.type =="digiline" then
person = event.msg
print(person)
end
end
Kann uns bitte jemand helfen? Was muss geändert werden?
Wie smomk8d schon geschrieben, das "get" (egal, ob groß oder klein geschrieben), landet im Feld, wo die Namen der zu entdeckenden Spieler steht!
Who is online
Users browsing this forum: Google [Bot] and 7 guests