Automated Podium

Moderators: Disciple, zlovatt

Post Reply
Posts: 1
Joined: June 6th, 2010, 6:25 pm

Hi! I'm new here so first of all hello and what a wonderful site. I've been playing a lot with expressions long ago, and now I'm back, but kinda rusty.
Well this is my problem.

I have a scoreboard with precomps, each one with a text showing a number (the score).
Those texts are updated by a slider. So far so good.
What I want to do is to arrange this precomps one over the other according to the score. The higher the score, the higher the layer.
It would be great to have an expression to control the position and snap it accordingly to the number on the text layer, but I cannot think how.
Besides, I have four scoreboards, each with different amount of precomps, so the expression shouldn't be layer number sensitive.

I'm kinda on a rush so if anyone can help I'd be really grateful!


Pablo Apiolazza
Posts: 128
Joined: December 7th, 2007, 10:11 am

You could use the score as your Y-position. That would sort automatically higher score higher.
you could normalize it to the scale you want (if for example you know the score is from 0 to 100 you could divide by 100 to have a number between 0 and 1, and then multiply to have it in pixels for the Y-position. note that Y axis goes opposite to what you would want, since 0 is the top of the screen and 576 is for example the bottom of the screen in PAL resolution)

you could use something like (for the Position property):

score = slider(...choose you slider here...);
MaxScore = 100;
MaxYresolution = 576;
Ypos = MaxYresolution*(1 - score/MaxScore);
[value[0], Ypos]

Post Reply