'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
------------------------------
Original Message:
Sent: 08-14-2024 12:14
From: John Spitznagel
Subject: Triggering Different Scene Directors from a Datalinqed Textbox
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
------------------------------