Graphics

 View Only
  • 1.  Triggering Different Scene Directors from a Datalinqed Textbox

    Posted 08-14-2024 12:14

    Hey there!

    I'm working on our project for football, and I'm trying to trigger different scene directors when a team takes a timeout. This OnSetText script compiled, but it still won't trigger the directors.

        Dim textBox As xpTextObject
        Dim sceneDirector2 As xpSceneDirector
        Dim sceneDirector1 As xpSceneDirector
        Dim sceneDirector0 As xpSceneDirector
    
        Self.GetObjectByName("AwayTOText", textBox)
        scene.GetSceneDirectorByName("AwayFirstTO", sceneDirector2)
        scene.GetSceneDirectorByName("AwaySecondTO", sceneDirector1)
        scene.GetSceneDirectorByName("AwayThirdTO", sceneDirector0)
    
        If textBox.Text = "2" Then
        	sceneDirector2.playrange(0,30)
        ElseIf textBox.Text = "1" Then
        	sceneDirector1.playrange(0,30)
        ElseIf textBox.Text = "0" Then
        	sceneDirector0.playrange(0,30)
        End If

    Please let me know if any other info would be useful!



    ------------------------------
    John Spitznagel
    Video Production Engineer
    Elon University
    ------------------------------


  • 2.  RE: Triggering Different Scene Directors from a Datalinqed Textbox

    Posted 08-14-2024 13:31
    'not this
    'Self.GetObjectByName("AwayTOText", textBox)
    
    'this
    Scene.GetObjectByName("AwayTOText", textBox)

    Look at the top of the code window and you'll see the vars.

    Self as xpTextObject

    This might even be the text object you're looking for,  so no need to search.

    Use Self.Text instead of textBox.Text



    ------------------------------
    Azathoth
    Son of Cthulhu
    ------------------------------



  • 3.  RE: Triggering Different Scene Directors from a Datalinqed Textbox

    Posted 08-15-2024 22:11

    To add on to Azathoth's point that you're already probably getting the text object included as Self:

    Within OnSetText, you should also get a variable simply called "Text", and this is the UPCOMING text that is going to be set on the text object. Getting Self.Text will yield what the text object currently has that is about to be replaced



    ------------------------------
    Zachary Fradette
    United States
    ------------------------------