Register     Password recovery
username Username:
password Password:

Scripting manual

Introduction

Scripting allows you to make a lot more interesting maps because you can add events and custom goals to your map.

Scripts can be added to maps from the map editor by opening "Editor" menu and then "Script". We recommend using different editor (for example notepad) to write the script and then copy it into the game. If something happens, you will always have a copy of it.
Be aware, scripting a map is not an easy task. To make a good map you have to test it thouroghly and think about all possible scenarios how a player could do things wrong!

Basics

Scripts are written in XML format. They exists in the form of triggers. Each trigger contains conditions and actions and must have a unique name. If all conditions for a trigger are met, actions are invoked.

Note that each trigger must have a unique name!

Basic overview about script structure:

<script>
	<setup>
		<!-- setup actions -->
	</setup>
	<trigger name="myTrigger" noOfTimesAllowedToInvoke="1">
		<condition type="someConditionType" />
		<condition type="someConditionType" />
		<action type="someActionType" />
		<action type="someActionType" />
	</trigger>
	<trigger noOfTimesAllowedToInvoke="1">...</trigger>
</script>