Every element in all panels and dialogs has a context help. For a short help hoover the mouse cursor over an element and a tool tip will appear. If you need a detail description of the function, select the question mark in title bar of the current dialog and click on the element.
In the 3d-mode, scripts can be executed. This way you can easily make skyboxes or let the camera automatically move around. All scripts have to be in the directory "./enginefiles/scripts/" and end with ".txt".
To execute a script you have to open the console. Do this by pressing the "^" key on your keyboard while you are in 3d-mode. In the console, a script can be started by typing in "scripts.loadScript("rotateloop")" and pressing ENTER. rotateloop could also be the name of any other script.
A script can be created or modified with any text editor. A "HelloWorld"-Script would loke like this:
<script>
<0>
<time>5.0</time>
<method>console.addMessage("Hello World!")</method>
</0>
<1>
<time>7.0</time>
<method>console.addMessage("Bye...")</method>
</1>
</script>
The entire script has to be contained within a "script"-tag. It can have any number of numbered actions. The "time"-tag holds the second, at which the action takes place. Times have to be absolute, which means that in this example action 1 is executed 2 seconds after action 0. The tag "method" tells the engine which method to start. All functions that can be typed into the console are possible. These methods are:
-
camera.makeScreenshot()
Saves the current screen as a screenshot in "./screenshots".
-
camera.makeScreenshotEx("prefix", aspect)
Saves the current screen as a screenshot in "./screenshots". prefix defines a string for the beginning of the file name. aspect sets the size of image. With 2 you get a rectangle image (width = 2 * height). The image won't get resized but overlapping areas will are deleted.
-
camera.moveLookAt(startDirX, startDirY, startDirZ, endPosX, endPosY, endPosZ, endDirX, endDirY, endDirZ, duration)
Moves the focus point in 'duration' seconds to the position 'endPosX/endPosY/endPosZ'. The movement starts in the direction of the vector 'startDirX/startDirY/startDirZ' and ends in the direction of the vector 'endDirX/endDirY/endDirZ'.
-
camera.movePosition(startDirX, startDirY, startDirZ, endPosX, endPosY, endPosZ, endDirX, endDirY, endDirZ, duration)
Moves the camera in in 'duration' seconds to the position 'endPosX/endPosY/endPosZ'. The movement starts in the direction of the vector 'startDirX/startDirY/startDirZ' and ends in the direction of the vector 'endDirX/endDirY/endDirZ'.
-
camera.setFieldOfView(verticalAngle)
Sets the field of view. verticalAngle defines how many degrees should be visible in the plumb line.
-
camera.setLookAt(x, y, z)
Sets the focus point to 'x/y/z'.
-
camera.setPosition(x, y, z)
Sets the camera to position x/y/z.
-
console.addMessage("text")
Prints 'text' in the console.
-
console.close()
Closes the console.
-
console.open()
Opens the console.
-
heightBasedFog.disable()
Disables the height based fog.
-
heightBasedFog.enable()
Enables the height based fog. Only enable it, if you disable it before.
-
hud.hide()
Hides all information elements from screen (debug informations and minimap).
-
hud.show()
Shows all information elements from screen (debug informations and minimap).
-
scripts.loadScript("name")
Executes the script 'name'.txt in "./enginefiles/scripts/".
-
scripts.showAll()
Shows all available scripts in "./enginefiles/scripts/".
-
scripts.stopAll()
Stops all active scripts.
-
terrain.disableWireframe()
Disables wireframe for the landscape.
-
terrain.enableWireframe()
Enables wireframe for the landscape.
-
water.disable()
Disables water.
-
water.disableWireframe()
Shows the normal water.
-
water.enable()
Enables water.
-
water.enableWireframe()
Shows the water as wireframe.
In parameters for methods some constants can be used. These constants are defined:
-
px, py and pz
These three Constants can be used for all number parameters. The vector (px,py,pz) points to the current position of camera. The camera can be rised by 5 units with this command: "camera.setPosition(px,py+5,pz)". Use +, -, * and / as operators.
-
project
This constant can be used for all string parameters. project is the name of the current landscape. "This landscape is test" can be written out by: "console.addMessage("This landscape is "+project)".Use + as operator only.
ScapeMaker comes with the following scripts which can instantly be used:
-
rotateloop
Rotates the camera around the center of the landscape. To stop the scripts type "scripts.stopAll()".
-
skybox
Creates 6 screenshots needed for making a skybox.