MotionArtist Variables Explained For MotionArtist 3 and 4MotionArtist's variables are extremely useful, but actually setting them up can be a bit intimidating. This tutorial takes users behind the scenes a bit to describe just what's going on in all those dialog boxes. MotionArtist's variables are managed and applied through a series of dialog boxes that allow you to set values and define conditions under which certain things will happen. These dialogs typically appear in a particular order, and although their use has been discussed in and others, a bit of detailed explanation may be in order.  1. When you first click the Variable button in the Properties dialog for an object, you get the Variable Settings dialog. Any item in the page can control variables and also be controlled by them; this dialog allows you to choose from several options to determine how the current item interacts with any variables that may be present. These options include- A. Have a variable take on a value when the item appears in the Timeline (you can use any variable and assign it any value; this can be useful to control when options become available or when actions occur.) B. Have a variable take on a value when the item disappears from the Timeline (same theory here, but in reverse) C. Have any variable take on a value when this item is clicked (that's pretty self-evident) D. Have a variable take a value when the user mouses over the item- this is very useful for subtly controlling SWF activity or the visibility of things. E. Have a variable take a value when the user mouses off this item- see above. F. Show/Hide by Variable Value allows a variable of your choice- which may or may not be controlled by this item; the chosen variable may take values based on other activity in the page as well- to control whether this particular item is visible or not. Using Show/Hide by Variable Value in conjunction with one or more other options allows the current item to be controlled by a variable as well as to control a variable or variables.   2. Clicking the Settings button for any of those options allows you to choose exactly what happens when the chosen activity occurs. For the value-assigning functions (A-E above), this brings up the Variable Settings dialog, which lets you specify which value gets assigned to what variable when the chosen activity occurs. The first thing you'll see is a drop-down menu/text field with the current set of variables- by default in MotionArtist 4 you get 5 variables named Variable1, Variable2 etc. You can rename these to whatever you like, or click the List of Variables button to bring up yet another dialog that allows you to create and manage all the variables used in the scene (I'll get to that in a second.) The Action section allows you to specify what happens to the variable's default value when the action that you specified in A-E above occurs- you can have it assigned a fixed value, have its current value multiplied or divided, added to or subtracted from, or set randomly. Finally, the Value setting at the bottom of the Variable Settings dialog lets you set an explicit value to be assigned to the variable (if you chose the Set Variable Value radio button above) or to be used for addition, subtraction, etc.; that can be any value you like- you can even set it to use a different variable's current value, by clicking the Variable button there. For option F, Show/Hide By Variable Value, the Settings button allows you to specify under which conditions the item is hidden or revealed. The button in this case brings up the Conditional Settings dialog, which looks a lot like the Variable Settings dialog in that it allows you to choose which variable affects the show/hide behavior, and lets you set the specific conditions under which the chosen item is hidden or revealed. The Variable Values section allows you to specify what range of values will trigger the activity (value is equal to a given number, greater or less than a threshold value, or between two given limiting values) any of which can also be taken from another variable by clicking the Variables button next to the selected option. The entry at the bottom of the dialog lets you specify when exactly to show or hide the item- if you choose the Show radio button and select 'when the conditions are true', the item will be hidden until those conditions become true, and only appear while they are true; if you select the Hide radio button and choose 'when the conditions are true' the item will only be hidden while the specified conditions are true, otherwise it'll show up, and of course the reverse is also true. This option would seem to be overkill but it can allow you to very precisely control exactly what conditions trigger which behavior- you can have an item hidden or shown unless a particular event occurs, or while a particular condition applies, and it's all based on variable values.   3. Clicking the List of Variables button brings up the List of Variables dialog (logically enough); this dialog allows you to edit the variables already used in the project, and to create and edit new ones. Clicking an existing variable allows you to edit it- the Edit button then brings up the Edit Variable dialog, which lets you change the name and the default value that the variable will have. Clicking the Add button brings up that same dialog, but with a new variable rather than an existing one. If your MotionArtist 4 project uses five or fewer variables you may never need to use the List of Variables dialog, but MA3 users will need to get familiar with it since MotionArtist 3 requires you to create all variables from scratch.  4. Closing the Conditional Settings dialog brings up the List of Conditional Settings dialog, which lets you view and edit all the conditional settings that the current item uses- and a given object can apply different values to different variables depending on whether it appears in the scene, vanishes, gets clicked on, moused over, etc., and can in turn be affected by different variable values. Usually unless there's another event you wish to add, or unless some existing event is incorrectly triggered by this item, you'll just use this to review, but it does provide a useful overview and allows you to quickly get to any event managed by the current item.
|