Graphics

 View Only
  • 1.  Disable take id while another id is online

    Posted 11-17-2014 20:02
    As the title says.

    Is it possible to disable an item while another one is online?

    -Fredrik


  • 2.  RE: Disable take id while another id is online

    Posted 11-17-2014 21:07
    I think an explanation of your application might help. What are you trying to accomplish?

    #XPression


  • 3.  RE: Disable take id while another id is online

    Posted 11-17-2014 21:18
    I have two buttons that each triggers a page with GPI, and when one is triggered and go online I don´t want the other to go online at the same time. I am using this for a gameshow where the contestants have a buzzer.

    I would have done this with a relay on the trigger mechanism that disables the other button , but have to look for other options right now.

    #XPression


  • 4.  RE: Disable take id while another id is online

    Posted 11-17-2014 22:51
    You need to use 2 layers for that dedicated to this mechanism.

    When a GPI is triggered, it put your scene on layer 4 (in my example). If layer 5 is free, contestant is the first to buzz -> Scene move on layer 5; else, if layer is not free, scene don't go online.

    Dim MyFB as xpOutPutFrameBuffer

    Engine.GetOutputFramebuffer(0, MyFB)

    Dim MyScene as xpscene

    if MyFb.GetSceneOnLayer(5, MyScene) then

    'A scene is already on layer 5

    Self.SetOffline()

    Else

    MyFB.moveLayer(4,5)

    end if


    #XPression


  • 5.  RE: Disable take id while another id is online

    Posted 11-17-2014 23:11
    Okay, thanks!

    I have't scripted a lot in XP. Where do I put this code? In the Keyboard/ GPI Mapping or the Scene Director?

    #XPression


  • 6.  RE: Disable take id while another id is online

    Posted 11-17-2014 23:30
    Oh sorry, I forget to tell you that...

    On the scene that is setonline by your GPI Mapping, under "OnOnline".

    #XPression


  • 7.  RE: Disable take id while another id is online

    Posted 11-17-2014 23:49
    I might be doing something wrong, the script is not doing anyting.... I have set the GPI to take the specific id, under GPI Mapping. I copy and pase your script inside Script Events > OnOnline.

    My two "buzz scenes" does not output on layer 5, only layer 4.

    #XPression


  • 8.  RE: Disable take id while another id is online

    Posted 11-18-2014 00:06
    Check your PM

    #XPression


  • 9.  RE: Disable take id while another id is online

    Posted 11-18-2014 09:51
    Now it's working! Thanks to Vincent :-)

    #XPression


  • 10.  RE: Disable take id while another id is online

    Posted 11-20-2014 04:39
    Sorry Vincent or Fredrick ... Could you explain how to repair the trouble.

    I'm not doing the project like this, but I hope someday it is usefull for me.

    Thanx...

    #XPression


  • 11.  RE: Disable take id while another id is online

    Posted 11-20-2014 07:48
    Just by copy/paste the right code ;)

    #XPression