Results 1 to 2 of 2

Thread: Lua state refresh with dynamic var

  1. #1
    Join Date
    Jun 2005
    Location
    Switzerland
    Posts
    278

    Default Lua state refresh with dynamic var

    if I have the full var name in the getVariable the state refresh whenever
    the var value change

    Code:
    if NetRemote.GetVariable("Allen_OutMute.index_16") == "1" then
    return true
    else
    return false
    end
    if I put something like that in the lua state than the refresh does not work.
    only when the var "Audio_Zone" change

    Code:
    local helper = NetRemote.GetVariable("Audio_Zone")
    local helper2 = "Allen_OutGain.index_" .. helper
    
    if NetRemote.GetVariable(helper) == "1" then
    return true
    else
    return false
    end
    but I need the state change when the "Allen_OutGain.index_(dynamic)" change.

    Is this possible?
    ---Simon

  2. #2
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    You could try

    Code:
    if NetRemote.GetVariable([[Allen_OutMute.index_<Audio Zone>]]) == "1" then
       return true
    else
       return false
    end
    --Rob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •