A easy and priceless expressionis the value attribute. It’s most effective function is to output the currentproperty value on the current time. The value attribute is referenced by using the phrase value,and it’ll reference a property’s present quantity. Manipulating the value with operators is viable,and it permits alterations to the original value. You’ll observe the Rocket layer’s Positionis keyframed to simulate a vertical launch, however the Rocket’s beginning Positionis on the ground. Shall we embrace you wanted to shift the Rocket’sPosition underground to make it look like it’s launching from below ground. So, first, you are gonna wish to open the Positionproperty by hitting "P" for your keyboard, and on the grounds that we’re handiest workingwith the Y axis here, you are gonna need to right-click Positionand Separate Dimensions.Now, this gives you keyframes for all threevalues, i’m gonna go ahead and delete X and Z, considering the fact that we’re onlyworking with the Y. And now, you are gonna need to add anew expression to the Y position property. So, first matters first, you are gonnawant to form worth, after which click off the expressionto save the alterations. And, when you quickly scrub the playhead,you’ll detect that nothing’s changed, it is still utilizing the values as before. And we are able to even toggle the expression on andoff and you can see there’s no difference. But, now that you’ve this valueas our anchor, as a way to converse, you could to manipulate this valueby using an addition operator and then a worth of 250.So whilst you click away from the expressionfield, you’ll be able to discover the Rocket has now shifted underneath floor via 250 pixels. And now, if you happen to RAM Preview the scene, you’llnotice the Rocket nonetheless makes use of the keyframed launch values whilst offsetting itby 250 pixels. A further excellent expression to be mindful of isthe valueAtTime expression. It can be used similar to price besides forone change: the value is not locked to the composition’s present time. This expression has two materials: the method title,valueAtTime, with a capital A and a capital T, and one argument within parentheses,which represents the analysis time, in seconds. To safely demonstrate this expression, wewill create a follow-the-chief animation with two Rockets. So, you’ll become aware of two Rocket layers, one iscalled Rocket chief, which we’ve got been working with.And the other is known as Rocket comply with,and it has no keyframes and is sitting at it’scurrent default role. So, i am gonna go ahead andturn the layer on. After which hit "P" on your keyboard to openthe role property for Rocket comply with. Now, for this role property, i’m alsogonna right-click and Separate the scale. And now, i’m gonna add a new expression tothe Y position of the Rocket follow layer. So, with each of these visible within the timeline,i’m gonna take hold of the decide upon whip tool, you can come as much as the Rocket leader layerand let go on the Y role property. It can be gonna fill in someautomatic syntax for you. After which, with your cursor at the very endof this reference, that you would be able to with ease add valueAtTime, capital A and capital T, open parenthesis, andwe’re gonna use time as the present evaluated time, and we’re gonna minus 1 2nd from it,after which close parenthesis.So, this is pronouncing take the value at timeminus 1, which gives us a 1 2d lengthen. So in case you click on off the expression, it is gonnasave your alterations, and you’ll be able to discover the Rocket has now jumped underground,just like the Rocket leader layer. So both of their Positions are the particular identical,and if I scrub the timeline to 1 2nd in time, our original Rocket chief layer isway up here within the sky at 515 value, but the Rocket comply with layeris still at its original 1380.But if I slowly scrub the playhead, you’llnotice that now the 2d Rocket pops out from underneath the groundand follows the first one. So, should you preview this animation, the RocketLeader will take off, simply as earlier than, and Rocket comply with comes proper in the back of it and launchesalong the same course, but on a 1 second extend. You can find the worth expression syntax in theExpression language Menu below the Property class. Now we have arrived at the finish of Lesson 203:Manipulating properties With the value Expression for those who revel in this expressions path,remember buying the paid content. It entails in-depth documentation,extra tutorial content, excessive definition movies, and all the challenge records used within the training. Your purchase will support to create morefree publications like this in the future..
As found on Youtube