[Mod] Advanced Trains [advtrains] [2.1.1]

nitro2012pl
New member
Posts: 4
Joined: Sat Oct 31, 2015 10:02
GitHub: nitro2010

Re: [Mod] Advanced Trains [advtrains] [2.1.1]

by nitro2012pl » Post

Hello everyone,

I have question: How send the data from ATC Controller to digiline LCD?
I wrote e.g.:

digiline_send("0", string.format("SPEED: %s", atc_speed))

and I don't see any the data on LCD screen (channel: 0).

Thanks for help.

User avatar
Miniontoby
Member
Posts: 428
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Advanced Trains [advtrains] [2.1.1]

by Miniontoby » Post

nitro2012pl wrote:
Mon Sep 14, 2020 14:13
Hello everyone,

I have question: How send the data from ATC Controller to digiline LCD?
I wrote e.g.:

digiline_send("0", string.format("SPEED: %s", atc_speed))

and I don't see any the data on LCD screen (channel: 0).

Thanks for help.
1: check the connection between the lcd and the atm controller (I think you need Lua controller but ok)
2: try: digiline_send("0", "SPEED: 123")
3: if that shows SPEED: 123 then you got the lcd linked.
4: digiline_send("0", string.format("SPEED: %s", atc_speed)) -> atc_speed, is that set??
5: Maybe I can join the server (if it is an server, else please send the world download as zip) and help
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

Maverick2797
New member
Posts: 7
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: File location.geo not found

Re: [Mod] Advanced Trains [advtrains] [2.1.1]

by Maverick2797 » Post

You need to use the Lua ATC track, the basic ATC track has no external IO (mesecon or digiline) aside from the rightclick formspec.
To use luaautomation components you need to first create an environment. See the readme.txt in the advtrains_luaautomation for more info. To do anything with LuaATC you need the "atlac" privilege, which is generally reserved for moderators and administrators on most public servers.

Assuming lcd channel = "0":

Code: Select all

if event.train then
    digiline_send("0","Speed: "..atc_apeed)
end

nitro2012pl
New member
Posts: 4
Joined: Sat Oct 31, 2015 10:02
GitHub: nitro2010

Re: [Mod] Advanced Trains [advtrains] [2.1.1]

by nitro2012pl » Post

Yes, it is working
Thank you very much ;)

I also I tried with wireless mesecons and it is working
I only copy & paste screenshot with connections.

;)

Image

hlqkj
New member
Posts: 7
Joined: Wed Dec 11, 2019 20:10

Re: [Mod] Advanced Trains [advtrains] [2.1.1]

by hlqkj » Post

Working on a setup for a terminal station an idea come to my mind: would it be possible to have an ATC (or LUA) command to force players off a train?

The use case would be: a train arrives at a terminal station, enters an arrivals platform and stops at the station track to let passengers off. It then departs for a waiting/parking area where it'll wait for the next slot, before entering the departures platform.

I had situations in which players didn't get off the train and kept waiting while there was another one ahead of it departing, or other players who boarded the train at the arrival platform instead... Hence would be nice to have a way to force them off (could also be added as a checkbox to the station track I think).

What do you think of this?

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests