Difference between revisions of "Scripting tutorial lever"

304 bytes added ,  18:52, 16 March 2012
imported>Fg109
imported>Fg109
Line 6: Line 6:
=Lever Scripting Tutorial=
=Lever Scripting Tutorial=


In this tutorial, we will be scripting a lever to open one of three doors.  This is my first tutorial, and practically first time editing a wiki, so it's probably not as good as it could be.
In this tutorial, we will be scripting a lever to open one of three doors.  This is my first tutorial, and practically first time editing a wiki, so it's probably not as good as it could be. Please leave comments on the talk page so I know how to make this better.  Is it too long?  Too short?  Not descriptive enough?  Filled with too much unnecessary information?  Did you learn anything about scripting, or did you only learn that you could put this script onto a lever to control 3 doors?


===Lever Design===
===Lever Design===
Line 133: Line 133:




{{ProTip|If you want to learn scripting, you must understand the structure of if-elseif-endif statements.  Basically, you start with "if" to check if a condition is true.  If it is true, then every line after it is executed until you come to either an "elseif" or "endif".  The "elseif" conditional is optional.  It is useful if you want to check for a new condition when you know the previous condition(s) were not true.  Like "if", if the "elseif" condition is true, all the lines after it are executed until you come to another "elseif" or "endif".  The "endif" is used to wrap up all if-elseif-endif structures.  For every "if", you must have an "endif" or else the script won't compile.}}
{{InDepth|If you want to learn scripting, you must understand the structure of if-elseif-endif statements.  Basically, you start with "if" to check if a condition is true.  If it is true, then every line after it is executed until you come to either an "elseif" or "endif".  The "elseif" conditional is optional.  It is useful if you want to check for a new condition when you know the previous condition(s) were not true.  Like "if", if the "elseif" condition is true, all the lines after it are executed until you come to another "elseif" or "endif".  The "endif" is used to wrap up all if-elseif-endif structures.  For every "if", you must have an "endif" or else the script won't compile.}}




Anonymous user