Send game engine command from LUA?

Discussion in 'Programming' started by Dummiesman, Dec 10, 2014.

  1. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Hey! Is there any way to send a game engine command from LUA ?

    such as thePlayer.SetTransform("0 0 0 0 0 0 0 0 0"); ?
     
  2. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    bump. still road blocking me.
     
  3. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    From which lua instance? physics system, vehicle or T3D Lua?

    From T3D Lua it is currently not possible :/
     
  4. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Vehicle Lua
     
  5. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    just looked, not possible :\
     
  6. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Is it possible to implement this like it's done in Javascript?
     
  7. theshark

    theshark
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    137
    Well you can execute js can't you?
    It would be the worst workaround of all times but you could build a string where a ts function gets executed with a js function and execute that as js.
     
  8. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Well since what I'm programming is in Lua, is it possible to execute JS From Lua?
     
  9. theshark

    theshark
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    137
    Code:
    obj:executeJS("your_js_foo_here()")
    as is said: uglies workaround ever.
    also slow as hell.
     
  10. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Only needs to be called once every thousand frames or more. Thanks :)
     
  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