Graphics

 View Only
  • 1.  Football Scripting Help Needed

    Posted 07-18-2018 16:07
    So I'm working on a scorebug for Football and the design our graphics team has come up with involves the quarter and play clock data being in the same position. From :40 down to :12 the QTR is what needs to be visible, but from :12 down to :0, the Play Clock needs to be visible. This then needs to reset to show the QTR whenever the Play Clock is reset to either :40 or :25. Now I know that this could easily be done by saying OnSetText:

    if text = "40" then
    PlayClock.visible=false
    QTR.visible=true
    else if text = "12" then
    PlayClock.visible=true
    QTR.visible=false
    end if

    but we don't want to have an abrupt change. Instead, we just simply want the Play Clock to dissolve over the QTR and vice versa. So currently, I've tested this with two Scene Directors, QTRtoPC and PCtoQTR where the scene directors simply dissolve into each other. However, I haven't been able to find a script that properly does this change correctly. The issue I've been having with the script I am running is that the PC will correctly dissolve over the QTR at :12, but it won't properly run the PCtoQTR scene director whenever the Play Clock resets to :40.

    Anyone have any ideas for this?


  • 2.  RE: Football Scripting Help Needed

    Posted 08-17-2018 03:36

    I played with this in a very basic sense. I made a scene director that ran an animation (think of it as your QTR to PC). On the clock, I added a script: dim qtr as xpSceneDirector

    scene.GetSceneDirectorByName("QTRtoPC", qtr)

    if trim(text) = "40" then
    qtr.PlayRange(0,20)
    elseif trim(text) = "12" then
    qtr.PlayRange(20,0)
    end if

    To eliminate leading zeroes, etc, I also used a visual logic block that took the time and only looked for 40 & 12. And I applied the script to this new text field instead of the timer text field.


    #XPression