Animated text ticker

I’m trying to determine how to best/easiest implement scrolling text to my groov view.

I’m got a text label tied to a tag in my strategy. and I’m using optoscript to populate the text box with text from my string variable.

how is best way to “animate” this message like a ticker tape. optoscript?

First up, welcome to the forums!

In a word. Yes.
You need optoscipt to do the scrolling text so that groov can just look at the string and the ‘magic’ is done in the Opto Controller.

Its been a long while since I personally looked at this code, but here is some code one of the developers came up with to do just this;

Need:
The tag to scroll: groov_sScollingText
A couple of integers: nScrollStringLen, nScrollSpeed
Temp string for building the new one: sScrollingTemp

 // scrolling text, X chars at a time

nScrollStringLen = GetStringLength( groov_sScollingText );

if ( nScrollStringLen <> 0) then // we have something to scroll

  if (nScrollStringLen < nScrollSpeed) then // our string is too short to scroll this fast, change to 1

    nScrollSpeed = 1;

  endif

 // grab the beginning to stick on the end (hold in sScrollingTemp until it's time to add it to the end)

  GetSubstring(groov_sScollingText, 0, nScrollSpeed, sScrollingTemp);

 
  // grab the end (all the nScrollSpeed chars) and stick it at the front

  GetSubstring(groov_sScollingText, nScrollSpeed, nScrollStringLen - nScrollSpeed, groov_sScollingText);

 

  // append the part we saved earlier

  groov_sScollingText = groov_sScollingText + sScrollingTemp;

 

endif

Please be sure and report back how this goes for you and if you needed to tweak the code.
It could be very handy for any that follow in your footsteps.