Original Message:
Sent: 10-22-2024 12:55
From: Avery Cook
Subject: OnSetText basketball animation
Wonderful, that got it to finally work, thank you very much!!
------------------------------
Avery Cook
Freelancer
Omaha United States
Original Message:
Sent: 10-22-2024 03:46
From: Roman Yaroshenko
Subject: OnSetText basketball animation
Hi Avery.
The problem is that when you put a script on OnSetText, it runs before the other text object receives data from DataLinq. So do this: 1 create an additional SceneDirector, place an Event with the script below on the first frame.
Dim shown, data As xpTextObject Dim dir As xpSceneDirector scene.GetObjectByName("H SHOWN", shown) scene.GetObjectByName("H DATA", data) Dim points As Integer = CInt(shown.Text) - CInt(data.Text) Dim name As String If points = 3 Then name = "H3PT" Else name = "H2PT" End If scene.GetSceneDirectorByName(name, dir) dir.PlayRange(0, 30)
2. In OnSetText in both text objects, make a script that pushes this auxiliary SceneDirector to play
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 10-21-2024 17:23
From: Avery Cook
Subject: OnSetText basketball animation
I have been struggling to get my basketball bug to trigger a different animation based on whether it was a 2 or 3 point increase. I found old threads talking about this exact topic and tried to change my code up a bit to match what I found in those but still no luck. I have two text objects "Data" and "Shown", I have the OnSetText set to the datalinq'd "Data" text object. It pulls in the two text objects and subtracts the value and then hits an if statement to trigger an animation. Except it is only triggering the 2 point animation. The "Shown'" text object it is pulling in is only ever "0" never seems to change there. Yet, in the animation is script that is supposed to do Shown = Data and according to the debug messenger it is doing it there but the change seems to only exist and hold true within the animation. I have pictures attached, cannot for the life of me figure out where I am going wrong.
------------------------------
Avery Cook
Freelancer
Omaha United States
------------------------------