JASS and JASS2 (sometimes said to stand for Just Another Scripting Syntax) is a scripting language provided with an event-driven API created by Blizzard Entertainment. It is used extensively by their games StarCraft (JASS) and Warcraft III (JASS2) for scripting events in the game world. Map creators can use it in the Warcraft III World Editor and the StarCraft Editor to create scripts for triggers and AI in custom maps and campaigns.
JASS was replaced with Galaxy script in StarCraft II.
Features[]
The language provides an extensive API that gives programmers control over nearly every aspect of the game world. It can, for example, give orders to units, change the weather and time of day, play sounds and display text to the player, and manipulate the terrain. It has a syntax similar to Delphi, although, unlike that language, it is case sensitive. JASS primarily uses procedural programming concepts, though popular user-made modifications to Blizzard's World Editor program have since added C++-like object-oriented programming features to the syntax of JASS.
Sample code[]
The following function creates a string containing the message "Hello, world!" and displays it to all players:
function Trig_JASS_test_Actions takes nothing returns nothing local string a ="Hello, world!" call DisplayTextToForce( GetPlayersAll(), a ) endfunction
or if you want this only for one player:
function Trig_JASS_test_Actions takes player p returns nothing call DisplayTextToPlayer(p, 0,0, "Hello, world!") endfunction
And if you want to print the message 90 times and show the iterator:
function Trig_JASS_test_Actions takes player p returns nothing local integer i=0 loop exitwhen i==90 call DisplayTextToPlayer(p, 0,0, "Hello, world! "+I2S(i)) set i=i+1 endloop endfunction
External links[]
Documentation[]
- An Introduction To JASS--A beginner's guide to the language, covering its basic features and capabilities.
- JASS Manual--An advanced guide to the language, intended to serve as a reference for users who are already proficient with it. Includes a comprehensive API browser.
- Tutorials--A collection of tutorials about the language.
- Warcraft 3 Modding Wiki--Getting better and better.
Communities[]
- Wc3Campaigns--A forum for discussing Warcraft III modding, art and many other Warcraft III related things.
- The Jass Vault--A forum for discussing JASS development with other programmers.
- Warcraft III Map Development--Blizzard's official Battle.net forum for the World Editor.[dead link - archived copy]
- Hive Workshop - Warcraft III community, a specific forum section that contains tutorials regarding JASS scripting and the AI editor.
Scripts[]
- The Jass Vault--Contains a large collection of sample scripts.
- WC3sear.ch--Contains a large collection of sample scripts.
- Spell scripts
- AI scripts
- Other JASS scripts (Most of these scripts originally comes from The Jass Vault)
Tools[]
- Jass Shop Pro--An editor for JASS scripts.
- JASS Tools--Includes a syntax checker.