Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Multi-room logic

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

    Default

    You're only providing one parameter to NetRemote.RegisterVariableWatch, and also you need to put the variable names in quotes

    e.g.

    Code:
    local girderPlugin = NetRemote.GetPlugin("girder")
    NetRemote.RegisterVariableWatch("Did", girderPlugin)
    NetRemote.RegisterVariableWatch("CurrentZone", girderPlugin)
    NetRemote.RegisterVariableWatch("CurrentSource", girderPlugin)
    NetRemote.SetVariable("ShowZones", 0)
    --Rob

  2. #12
    Join Date
    Apr 2003
    Posts
    111

    Default

    i get the attached error when i use that code
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screen shot 2010-02-13 at 10.57.04 AM.png 
Views:	73 
Size:	15.2 KB 
ID:	5902  

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

    Default

    Oops, it wants an instance, silly me

    Try

    Code:
    local girderPlugin = NetRemote.GetPlugin("Girder"):GetCurrentInstance()
    Last edited by Rob H; February 13th, 2010 at 11:24 AM.
    --Rob

  4. #14
    Join Date
    Apr 2003
    Posts
    111

    Default

    nice. that works great.

    i made a script action with "CurrentZone = pld3" and an event that activates at CurrentZone. its working, but is that the most efficient way to complete the task?

    thanks alot

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

    Default

    That sounds fine to me. You could do something similar from Lua using gir.RegisterEventHandler(), but I don't really see any problem with what you have now.
    --Rob

Page 2 of 2 FirstFirst 12

Posting Permissions

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