Login

Fancade Wiki

Updated Fancade Web.md (markdown)

... ...
@@ -150,7 +150,7 @@ The command line is opened by the TAB key and can be used for quickly adding blo
150 150
151 151
In the beta version, there is an experimental editor scripting editor available that can be used for things like auto-tiling and procedural level creation. The editor is opened by the `EditorScript` command in the command line.
152 152
153
Editor scripts are written in Javascript (ECMAScript E5/E5.1), and here are some code examples:
153
Editor scripts are written in Javascript and here are some code examples:
154 154
155 155
```
156 156
// Find prefab by name
... ...
@@ -171,6 +171,9 @@ updateChanges(); // Time-consuming, don't do this after each call to setBlock()
171 171
// Log printout (only for strings and numbers for now)
172 172
log("Found a prefab " + prefabIndex);
173 173
174
// Clear log
175
clearLog();
176
174 177
// Get size of level or open block
175 178
var size = getSize(); // Returns an array [x, y, z]
176 179
... ...
@@ -183,6 +186,9 @@ var levelIndex = getLevel();
183 186
// Change level
184 187
setLevel((levelIndex + 1) % count);
185 188
189
// Get version of the editor script engine
190
var version = getVersion();
191
186 192
```
187 193
188 194
Fancade Wiki