Jump to content

Recommended Posts

Posted

Hallo ihr Lieben!

Programm kennt plötzlich eigene Befehle nicht mehr ?

Weder im EV modus noch mit lua, einfach Tilt.

Weiss Wer eine Lösung?

mit Freundlichen Grüssen

henry

local t = contact.variables["WahlQual"]
local t1 = {contact.variables["WahlFahrt"]}
local j = 0
local x = nil
local k = nil
t1 = nil
  for i, Wdh in ipairs(t) do
  print(i, Wdh["Gleis"].name)
   if #layout:getVehiclesOn(Wdh["Gleis"]) > 0 then
      print(i,"voll")
      j=j+1
      contact.variables["WahlFahrt"][j]= Wdh["Kontakt"]
    end
  end
 x = math.random(1, #contact.variables["WahlFahrt"])

 k= contact.variables["WahlFahrt"][x]
 print(x,k.name)
k.autoDeceleration = false
k.autoAcceleration = true

 

Unbenannt.jpg

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...