Scripting: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
Line 9: Line 9:
The first little code in every programming language is usually a small '''"Hello World"''' program. It is meant just to display this simple text.
The first little code in every programming language is usually a small '''"Hello World"''' program. It is meant just to display this simple text.


Open up the [[ArmA: Mission Editor|mission editor]], create a custom unit for the player and write the following code into its <tt>initialization</tt> line:
Open up the [[ArmA: Mission Editor|mission editor]], create a custom unit for the player and write the following code into its <tt>init</tt> line:


  [[hint]] "Hello World!"
  [[hint]] "Hello World!"
Line 15: Line 15:
This code is very simple: The [[:Category:ArmA: Scripting Commands|command]] [[hint]] displays the given text on the left upper side of the screen. The code is executed when the mission starts, since this is what the <tt>init</tt> line does.
This code is very simple: The [[:Category:ArmA: Scripting Commands|command]] [[hint]] displays the given text on the left upper side of the screen. The code is executed when the mission starts, since this is what the <tt>init</tt> line does.


== Learning Scripting - An Advanced Tutorial==
== Learning Scripting - A Tutorial==


Read the article [[ArmA: Introduction to Scripting|Introduction to Scripting]] to get introduced into the scripting language of [[Armed Assault]]. You will read, why one needs scripting at all and how the basic advanced scripting works.
Read the article [[ArmA: Introduction to Scripting|Introduction to Scripting]] to get introduced into the scripting language of [[Armed Assault]]. You will read, why one needs scripting at all and how the basics work.


Afterwards the article will point you to other articles telling you more about the scripting language.
Afterwards the article will point you to other articles telling you more about the scripting language.

Revision as of 23:00, 14 August 2007

The scripting language allows the user to control and influence the behaviour of the game engine. It is in its structure similar to real programming languages. With the large amount of scripting commands you can create dynamic processes happening during a mission. That is, for instance, a camera cutscene or custom interactions between the player and AI units. The scripting engine was designed to be very simple while remaining unlimiting for the scripter.

Requirements

You don't need any requirements to learn using the scripting language. You should be familiar to mission editing though, as this is the base for any scripting needs.

Getting Started

The first little code in every programming language is usually a small "Hello World" program. It is meant just to display this simple text.

Open up the mission editor, create a custom unit for the player and write the following code into its init line:

hint "Hello World!"

This code is very simple: The command hint displays the given text on the left upper side of the screen. The code is executed when the mission starts, since this is what the init line does.

Learning Scripting - A Tutorial

Read the article Introduction to Scripting to get introduced into the scripting language of Armed Assault. You will read, why one needs scripting at all and how the basics work.

Afterwards the article will point you to other articles telling you more about the scripting language.

Introduction to Scripting (Armed Assault) >>

Scripting Topics

See Category:Scripting Topics