Custom GlowMap inputs?

Discussion in 'Content Creation' started by CarlosAir, Nov 28, 2014.

  1. CarlosAir

    CarlosAir
    Expand Collapse

    Joined:
    Nov 16, 2013
    Messages:
    336
    I've been trying to make GlowMaps trigger using custom lua variables, but i haven't been able.
    With Hydros, we are able to use as inputs, custom variables created in our lua files (ie. electrics.values['custom_input'] = ... ).

    But that doesn't seem to work with GlowMaps, it seems that we are limited to use the default input options ("signal_L", "singal_R", "parkingbrake"...) as the "simpleFunction" parameter.
    I think it would be really nice and helpful if we had the option to use our own variables as inputs too. It will bring a lot of new possibilities allowing more complex control for certain lights as we required. Sometimes, the default inputs are not useful or appropiate enough for some more complex tasks that require a bit of lua coding. It has proven to be extremely useful in hydros.

    As I said, it is currently possible with Hydros, so why not with GlowMaps?

    Maybe it is already implemented and I'm not doing it correctly :p, what's the correct way then? What might I be doing wrong :p ?

    Thanks.
     
  2. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,087
    Hmm, code please?
     
  3. CarlosAir

    CarlosAir
    Expand Collapse

    Joined:
    Nov 16, 2013
    Messages:
    336
    Soo... should it be working then?

    I'm not talking about a specific piece of code. I'm talking about having the following in a lua file (extremely simple example):

    Code:
     local function init()
    
         electrics.values['custom_i'] = 0.8
    
     end
    and then this in the JBeam:

    Code:
     "glowMap":{
         "cube":{"simpleFunction":"[B]custom_i[/B]", "off":"cube", "on":"cube_l"},
     }

    This approach works with hydros but doesn't seem to work with Glowmaps.
     
    #3 CarlosAir, Nov 28, 2014
    Last edited: Nov 28, 2014
  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