Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
tutorial:writing_your_first_script [2018/07/03 05:50] optrix created |
tutorial:writing_your_first_script [2018/07/16 00:11] (current) optrix |
||
|---|---|---|---|
| Line 38: | Line 38: | ||
| So if we wanted to intoroduce someone to several components - the //Main Engine//, //Secondary Engine//, we could have the following script... | So if we wanted to intoroduce someone to several components - the //Main Engine//, //Secondary Engine//, we could have the following script... | ||
| - | <code> | + | <code xml> |
| + | <script> | ||
| + | <!-- Show the Main Engine--> | ||
| <perspective target="Main Engine"/> | <perspective target="Main Engine"/> | ||
| <waitforclick caption="This is the main engine"/> | <waitforclick caption="This is the main engine"/> | ||
| + | |||
| + | <!-- Show the Secondary Engine--> | ||
| <perspective target="Secondary Engine"/> | <perspective target="Secondary Engine"/> | ||
| <waitforclick caption="This is the secondary engine"/> | <waitforclick caption="This is the secondary engine"/> | ||
| + | </script> | ||
| </code> | </code> | ||
| Line 53: | Line 58: | ||
| For example, in this case we are going to highlight the //exhaust// on our main engine as part of our scripted tour. | For example, in this case we are going to highlight the //exhaust// on our main engine as part of our scripted tour. | ||
| - | <code> | + | <code xml> |
| + | <script> | ||
| <perspective target="Main Engine"/> | <perspective target="Main Engine"/> | ||
| <waitforclick caption="This is the main engine"/> | <waitforclick caption="This is the main engine"/> | ||
| + | <!-- Show the Main Engine Exhaust, and remove the highlight when you're done --> | ||
| <highlight target="Main Engine\*Exhaust"/> | <highlight target="Main Engine\*Exhaust"/> | ||
| <waitforclick caption="This is the main engine"/> | <waitforclick caption="This is the main engine"/> | ||
| Line 63: | Line 70: | ||
| <perspective target="Secondary Engine"/> | <perspective target="Secondary Engine"/> | ||
| <waitforclick caption="This is the secondary engine"/> | <waitforclick caption="This is the secondary engine"/> | ||
| + | </script> | ||
| </code> | </code> | ||
| - | \\Exhaust\\ is a component inside the Main Engine 3D model. By using the asterisk (*), we tell ARDI that we don't care where exactly the 'exhaust' object is, just that it must be //somewhere// under the Main Engine. | + | **Exhaust** is a component inside the Main Engine 3D model. By using the asterisk (*), we tell ARDI that we don't care where exactly the 'exhaust' object is, just that it must be //somewhere// under the Main Engine. |
| + | |||
| + | The **[[ardiscript:highlightobject|highlight]]** step shown above is an example of a step that needs to be //removed// when you're done. **[[ardiscript:unhighlight|Unhighlight]]** performs this job. | ||
| - | The **[[ardiscript:highlight|highlight]]** step shown above is an example of a step that needs to be //removed// when you're done. **[[ardiscript:highlight|Unhighlight]]** performs this job. | + | When a script terminates, it is //cleaned up//. This means that many behaviours - such as the Highlight shown above - will automatically be reversed when the script completes. |