[LUA] Accessing scenario variables

Discussion in 'Content Creation' started by aaa_, Nov 7, 2020.

  1. aaa_

    aaa_
    Expand Collapse

    Joined:
    Oct 17, 2019
    Messages:
    29
    Not done much lua before or wrote scripts for this game so slightly confused.

    I want to get the variables from the bus driver scenarios and print them to the console (for now)

    For example there's bus config, nextstop, currentLine.tasklist, finalWaypointName

    I tried things like print(nextstop) and print(tostring(nextstop)) print(tostring(m.nextstop)) from the console in GE LUA but that results in Attempt to index a nil value in the console, or the output was just nil.

    I noticed they're local variables so maybe because of that, don't have enough knowledge on LUA or the game engine on how to access them though.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice