Beginner's Guide to AlcScript

Revision as of 04:23, 14 January 2008 by Trylon (Talk | contribs) (New page: == Alcscript? == AlcScript is a way to set more complex properties on objects, than you can with simple blender logic proprties. In the basics, alcscript is just a text file that is read ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Alcscript?

AlcScript is a way to set more complex properties on objects, than you can with simple blender logic proprties.

In the basics, alcscript is just a text file that is read and parsed by the plugin. It is locates inside blender - blender has its built-in text editor.

Adding your first alcscript file

To add a default AlcScript file to your blender file, use "Scripts->Add->PyPRP->Add Default AlcScript" in a script window.

Make one window into a text window. Now on the text-windows-menu bar click the leftmost button wiht the double arrows on it, and select the file named "AlcScript".

Now you can start adding code to it.

AlcScript structure

Alcscript has a hierarchical formatting structure that allows us to group settings together, and nest group of settings in other groups of settings. Check the example below:

Ladder1_Top:
    type: region
    region:
        type: ladder
        ladder:
            direction: down
            style: twofeet
            loops: 7
Ladder1_Bot:
    type: region
    region:
        type: ladder
        ladder:
            direction: up
            style: twofeet
            loops: 7

Now you may notice a couple of things from this example:

  • There is a structure of keys and values much like this: <key>: <value>
  • A value can also be a group of other keys and values
  • You indicate a group of keys and values by indenting it - tis can be don with tab-key in your blender file.
  • There can be groups in groups in groups
  • The first key is always the name of the object, and object-specific settings are located below that.

In the example above, the two objects (ladder regions) - have two keys, "type" and "region". Now "type" is a simple setting - it corresponds to the "type" logic property (which was the "alctype" property) and just has a simpel string as input. (You can either use the logic property "type", or the alcscript property "type" at your leasure). The key "region" however, contains a

[will continue later]