Page 4 of 4

Re: Specialised moving text.

Posted: April 21st, 2017, 11:48 am
by kyriakos876
SilverDarkBlade wrote:thank you. i had just changed the W option and it fixed it. il remove some of the redundant in my code :P

however another issue i ran into lol. Increasing the space between the 2 text versions makes it reset early.
There are 4 or 5 ways to do that. Tell me your way so that I can guide you. What did you do to change the space?

Re: Specialised moving text.

Posted: April 21st, 2017, 2:16 pm
by SilverDarkBlade
kyriakos876 wrote:Simply go to:

Code: Select all

[MeterText1Mirror]
Meter=String
Text=Something
FontSize=50
X=((([MeterText1:W]>#Width#)*(([MeterText1:W]) + #XValue#))+(([MeterText1:W]<#Width#)*(#Width#+#XValue#)))
Y=0
AntiAlias=1
DynamicVariables=1
Now if you want to make the space larger, add the space you want next to #XValue#.
For example if you want to add 3 pixels the Xoption will become:

X=((([MeterText1:W]>#Width#)*(([MeterText1:W]) + #XValue#+3))+(([MeterText1:W]<#Width#)*(#Width#+#XValue#+3)))

If you want to make the space smaller, you just subtract the number.
For example if you want to make it 3 pixels close the Xoption will become:

X=((([MeterText1:W]>#Width#)*(([MeterText1:W]) + #XValue#-3))+(([MeterText1:W]<#Width#)*(#Width#+#XValue#-3)))
i tried to do it exactly like you said in this post

Re: Specialised moving text.

Posted: April 21st, 2017, 4:05 pm
by kyriakos876
SilverDarkBlade wrote:i tried to do it exactly like you said in this post
Oh apparently I forgot to say that you need to add or subtract the same number in this measure:

Code: Select all

[MeasureX1]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Action1 , 25 , #Repeat#
ActionList2=| Wait 3000 | Action2 | Repeat Action1 , 25 , #Repeat#
Action1=[!SetVariable XValue "(Clamp(#XValue#-2,(-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] ),#Width#))"][!Update]
Action2=[!SetVariable XValue "0"][!Update]
DynamicVariables=1
Specifically at:

Code: Select all

Action1=[!SetVariable XValue "(Clamp(#XValue#-2,(-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] ),#Width#))"][!Update]
More Specifically, at:

Code: Select all

(-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] )
Add or subtract the same number in there as well and you should be fine.
Random example:
(-10-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] )
See that -10 ? Do the same with either + or - with the same number you used on the meter.

Re: Specialised moving text.

Posted: April 21st, 2017, 9:07 pm
by SilverDarkBlade
kyriakos876 wrote:Oh apparently I forgot to say that you need to add or subtract the same number in this measure:

Code: Select all

[MeasureX1]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Action1 , 25 , #Repeat#
ActionList2=| Wait 3000 | Action2 | Repeat Action1 , 25 , #Repeat#
Action1=[!SetVariable XValue "(Clamp(#XValue#-2,(-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] ),#Width#))"][!Update]
Action2=[!SetVariable XValue "0"][!Update]
DynamicVariables=1
Specifically at:

Code: Select all

Action1=[!SetVariable XValue "(Clamp(#XValue#-2,(-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] ),#Width#))"][!Update]
More Specifically, at:

Code: Select all

(-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] )
Add or subtract the same number in there as well and you should be fine.
Random example:
(-10-#Width#-([MeterText1:W]>#Width#)*[MeterText1:W] )
See that -10 ? Do the same with either + or - with the same number you used on the meter.
ah thanks lol. you are a really helpful person. my code finally works as intended

Re: Specialised moving text.

Posted: April 21st, 2017, 9:22 pm
by kyriakos876
SilverDarkBlade wrote:ah thanks lol. you are a really helpful person. my code finally works as intended
No problem ^_^ Always glad to help!