player detector and digiline

Post Reply
smomk8d
New member
Posts: 1
Joined: Mon Apr 19, 2021 11:04

player detector and digiline

by smomk8d » Post

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

Stachel
Member
Posts: 57
Joined: Sat May 04, 2019 20:33

Re: player detector and digiline

by Stachel » Post

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests