--Lego brick wall
shift = true
for z in 0 to 9 do
(
shift = not shift; -- why colon?
for x = 0 to 9 do (copy $Lego).pos = if shift then [40*x,0,20*z] else[20+ 40*x,0,20*z]
)
Maxscript, can any one explain this script to me (be very clear)
156 Views Asked by Vamshi At
1
There are 1 best solutions below
Related Questions in COPY
- Objective-C Reference to object that implements protocol
- Copy to clipboard from Firefox add-on content script
- Implementing ICollection.CopyTo in C#: deep or shallow copy?
- Trying to create a Bath file that will copy a specific directory path (no lower) and zip the directories in that path
- C# How to get file/ copy file from a bzip2 (.bz2) file without extracting the file
- fast converting Bitmap to BitmapSource wpf
- include typescript file in output result build with TFS
- How to copy a table to another with primary key?
- Automated Testing (Watir): Retrieving data and implementing into your test?
- Php email send copy to sender
- Batch - xcopy files older than x minutes
- Copy rows with a specific condition
- Copy permissions form source file to file with same name
- SQL, postgres. I have a csv input file with columns like avg. When i export how do i keep my digits?
- The "trait Clone is is not implemented" when deriving the trait Copy for Enum
Related Questions in MAXSCRIPT
- Python scripting in 3dsmax
- Dot product with local axis in maxscript
- connecting slider with position controller in position list
- Denormalize vector
- How can I add a custom Parameter to a box in maxscript?
- Run Python on MaxScripts
- Maxscript, can any one explain this script to me (be very clear)
- A QApplication instance already exists
- Find missing coordinate in normalized vector
- Mxs: Calculate delta_x , delta_y , delta_z of an object
- How to save a bitmap as 16-bit in Maxscript?
- Setting FOV in Maxscript
- Color correction matrix in 3DS max on texture
- obj export in MaxfilePath
- Converting 3D Studio Max 8 scripts to 2011
Related Questions in LEGO-MINDSTORMS
- Javascript for lego Mindstorms
- nxt-python error: usb.core.NoBackendError
- How to resolve nxt-python error "ImportError: No module named 'nxt'"
- How to fix nxt.motor.BlockedException?
- Mindstorms EV3 - Find largest number in array
- Get EV3's serial number from program
- lejos color sensor problems
- Maxscript, can any one explain this script to me (be very clear)
- (Java, BricxCC) Unable to create process bash
- LEGO NXT Brick using NBC
- Lego-EV3: How to fix EOFError when catching user-input via multiprocessing?
- Bluetooth-connection between Android and Lego Mindstorm NXT
- Bluetooth connection to LEGO Mindstorms EV3 brick from iOS app
- Lego Mindstorms - Nondescript compilation Failure
- Remove NFC Tag in Python
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Line by line, first you set a variable which controls whether you are shifting the row or not. Then for row index z from zero to ten you switch the shift from true to false and vice versa. The semicolon is optional and not really needed. That's the outer loop. In the inner for loop, for each column index x from zero to nine you create a copy of a scene node named Lego - this returns a the object itself, so you can directly set its position given by the mulitples of indices - and add a shift in x axis if the row number is even.
You can also use modulo check if the row index is even and instead of creating a copy of the object and setting its position afterwards do it in the constructor: