Home> 4D Blocks > Version 6 Controls Settings Block Motion Examples > Scene Language Kinds of Blocks Goals History Versions
Geometry Commands More Geometry Commands Train Commands Elevated Train Commands Scenery Commands |
General InformationInclude FilesThe include system has been revised in version 4 to make it much more usable. The key concept is that when you say "include", you give the name of the file you want to include. That name is used to locate the actual file according to the following scheme.
As a result, you can create your own scene files in any directory without having to make copies of all the library files. Also, files are never included twice, so you can include whatever files you want without worrying about whether they include each other. Arithmetic If you're trying to build a scene that has parameters, sometimes you'll need to combine the parameters using a bit of arithmetic. The "add", "sub", "mul", "div", and "neg" commands do that. The first four are self-explanatory, and what "neg" does is take the negative. For example, "4 20 add 2 div neg" yields -12. Miscellaneous The "dup" command duplicates the object on top of the stack. The duplication is by reference, so basically you get two pointers to the same object, not two different objects. This is sometimes the right behavior. The "copy" command is the same as "dup" except that it makes copies of shapes and textures. Here are a few other commands that are even less useful.
|