Changes between Version 32 and Version 33 of Scripting/API


Ignore:
Timestamp:
Sep 9, 2016, 2:05:03 PM (13 months ago)
Author:
pepijn
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Scripting/API

    v32 v33  
    1919 
    2020The script will have access to any commandline arguments specified by the user when invoking the script via the `arguments` or `argv` array (both are available; the first command line argument is in `arguments[0]` or `argv[1]`; `argv[0]` contains the name of the script; in the `arguments` array that is not available). 
     21 
     22== Variables Available Inside !WorldPainter == 
     23 
     24When a script is executed inside !WorldPainter (Tools -> Run script...) it has the same `arguments` and `argv` arrays available as when run on the command line, in which the arguments entered by the user on the Run Script screen will be available. 
     25 
     26In addition it will have two global variables available: `world` and `dimension`, which point to the currently loaded world and the currently selected dimension respectively, and through which the script can modify the currently loaded world. 
    2127 
    2228== Loading a World ==