-
i need this complicated expression. any expert around here?
hey guys!
i found myself in this situation that i write below and i’m not able to come up with an expression. hope you can. i have to mention that i am not able to modify the project, so the comps and layers should remain as it is explained in description.so, i have a map with precomps: asia, africa, north america, south america, europe.
in every precomp, there are psd layers with the countries: in africa comp, the africa countries (every country is a layer), in asia comp, countries from asia, and so on..in another comp i have some nulls on which i put a slider for every country.
-null named Asia sliders, contains sliders with the names of the countries from asia: Russia, china, etc..
-null named Africa sliders, contains sliders with the names of the countries from africa… and so on.
the sliders have the same names as the psd layers: so china slider, china layer…now, what i wanna do is create a beam effect in another comp, and link the start point of the beam to the anchor point of a country, and the end point to the anchor point of another country.
now, the problem: i want an expression that verifies all the countries sliders, and where it finds a slider set on 1, then link the beam start point to that country’s anchor point, and where it finds a slider set on 2, links the beam end point to the other country anchor point
so i dont wanna be something like
comp(“Asia”).layer(“Russia”).transform.anchorPoint on the proprieties of the beam, but more like (now i’m just gonna write something that is not the expression, but you’ll get the point):
– on the layer “asia sliders”, on the slider named “russia” we put 1
– on the layer “africa sliders”, on the slider named “madagascar” we put 2a beam should start from russia and end at madagascar
the expression, this should be on the start of the beam propriety:
check every slider from the layer “Asia sliders”
check every slider from the layer “Africa sliders”
check every slider from the layer “Europe sliders”
check every slider from the layer “North America sliders”
check every slider from the layer “South America sliders”if one of those sliders = 1, then:
a) get the name of that slider = country_name
b) get the name of the layer on which that slider is, remove the “sliders” title = continent_name
c) comp(continent_name).layer(country_name).transform.anchorPointthen the same expression on the end of the beam propriety, with the mention that if one of the sliders = 2
that’s about it.
If you can pull this one off for me guys, you are brilliant!