Updated Fancade Web.md (markdown)
commited
commit
a986a2826378b50543a76775938125b7c5fe0489
... | ... | @@ -162,11 +162,29 @@ setBlock(x, y, z, prefabIndex); |
162 | 162 | // Remove block at position (x, y, z) in level or open block |
163 | 163 | setBlock(x, y, z, 0); |
164 | 164 | |
165 | // Update changes after using setBlock() |
|
166 | updateChanges(); // Time-consuming, don't do this after each call to setBlock() |
|
167 | ||
165 | 168 | // Get block at position (x, y, z) in level or open block |
166 | 169 | var prefabIndex = getBlock(x, y, z); |
167 | 170 | |
168 | // Update changes after using setBlock() |
|
169 | updateChanges(); // Time-consuming, don't do this after each call to setBlock() |
|
171 | // Set block value (number, first value) at position (x, y, z) |
|
172 | setBlockValue(x, y, z, 0, 15); // If a number block is at (x, y, z), it will get the value 15 |
|
173 | ||
174 | // Set block value (string, first value) at position (x, y, z) |
|
175 | setBlockValue(x, y, z, 0, "Text"); // If a comment block is at (x, y, z), it will get the value "Text" |
|
176 | ||
177 | // Set block value (vector, first value) at position (x, y, z) |
|
178 | setBlockValue(x, y, z, 0, [1, 2, 3]); |
|
179 | ||
180 | // Connect blocks at position (x1, y1, z1) and (x2, y2, z2) using terminal indices index1 and index2 |
|
181 | connect(x1, y1, z1, index1, x2, y2, z2, index2); |
|
182 | ||
183 | // Get terminal name of block at (x, y, z) and terminal index (empty string if missing) |
|
184 | getTerminalName(x, y, z, index); |
|
185 | ||
186 | // Get terminal type of block at (x, y, z) and terminal index (-1 if missing) |
|
187 | getTerminalType(x, y, z, index); |
|
170 | 188 | |
171 | 189 | // Log printout (only for strings and numbers for now) |
172 | 190 | log("Found a prefab " + prefabIndex); |