Scripter Commands
From OPU Wiki
| Table of contents |
Overview
Scripter recognises several commands. Each line of scripting code can contain only 1 command, and commands cannot be longer than 1 line.
Commands
BEGIN
Every command must be included inside a block. A block is defined by the BEGIN and END directives. BEGIN is followed by the blockname, and may include parameters, but not all blocks have params.
At this moment (version 0.2) there are only 2 blocktypes:
- MAIN
- PLAYER
The MAIN block contains all mission-specific definitions and a PLAYER block contains only player-specific information. A PLAYER directive is always followed by the player number. Make sure you define enough players for your mission: you cannot start a PLAYER block with a playernumber higher then defined by the SET PLAYERS command.
BEGIN PLAYER 1
END
Ends a block that was opened by BEGIN. There's no need to include the blockname after the END command, since you can only open 1 block at a time. You must always end a block before you can begin a new one.
BEGIN MAIN # This is the MAIN block END
SET
Use the SET command to set up properties. The SET command is used within all blocks and has the syntax SET <property> = <value>
SET PLAYERS=4 SET AUTHOR="My name here" SET FOOD=1000 SET MISSIONTYPE=COLONY
<value> can be a number, a string or a predefiend constant
BEACON
The BEACON command is used to create mining beacons. Each mission can have multiple mining beacons, but they need to be defined at mission start.
BEACON COMMON 8, 12, 1BAR, VARIANT2
UNIT
The UNIT command is used for adding new structures or vehicles. It must be used within a PLAYER block.
UNIT Lynx, 20, 14, Laser UNIT CommandCenter, 20, 20
