local notification_id = "NOID" local ind = POS(-2209,8,-651) -- IMPORTANT NB: remember to update this if you move the indicator mesecon switch local print_notification = true local function send_train() set_rc("FREIGHT BYARD_NOID_SHUTTLE BYARD BY_COLLECT_NOID BY_RTS NIDTH NOIDEA IND TREES") -- RC string to overwrite when departing for the autoyard, remember to include the return RCs as well step_fc() --step the fc forward to be ready for the autoyard atc_send("A1SM") F.indicator(ind,false) end if event.ext_int then -- trigger event from the yard itself. if event.message == "notify" then -- can also be a manual/other message, just edit this if statement if print_notification then print(rwt.to_string(rwt.now()).. " "..notification_id.." RX Notification") end if F.indicator(ind) then return end -- indicator is already lit, train hasn't collected the first set yet if atc_id then --send the train to the yard for collection send_train() return else -- set the indicator to await the returning train F.indicator(ind,true) return end end end if event.train and atc_arrow then if F.indicator(ind) then send_train() return end atc_send("B0") return end