aviationloading.blogg.se

Warcraft 3 editor
Warcraft 3 editor













warcraft 3 editor

separated statements MUST be placed on separate lines Local real r = 5.0 //local variable declarations must come before anything else in a function and variables may be Local integer i //declaring a local variable requires the modifier "local", the variable's data type, and the variable name Return i + r //return statements must begin with the keyword "return"Įndfunction //the keyword "endfunction" signals the end of a function blockįunction syntax_Example takes nothing returns nothing the function name, parameters (if any) and return type (if Examples of basic syntax are shown below:įunction syntax_Example_Sum takes integer i, real r returns real //function declaration must include: the keyword "function",

warcraft 3 editor

The following function creates a string containing the message " Hello, world!" and displays it to all players:įunction Trig_JASS_test_Actions takes nothing returns nothingĬall DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Hello, world!")įunction Trig_JASS_test_Actions takes player p returns nothingĬall DisplayTextToPlayer(p, 0,0, "Hello, world!")Īnd if you want to print the message 90 times and show the iterator:Ĭall DisplayTextToPlayer(p, 0,0, "Hello, world! "+I2S(i))

warcraft 3 editor warcraft 3 editor

JASS primarily uses procedural programming concepts, though popular user-made mods to Blizzard's World Editor program have since added C++-like object-oriented programming features to the syntax of JASS. It has a syntax similar to Turing and Delphi, although, unlike those languages, it is case sensitive. JASS can also create powerful functions such as trackables, which detects if a mouse goes over or hits a position, GetLocalPlayer(), which can cause disconnects if used improperly (such as using handles with GetLocalPlayer(). It can, for example, execute simple GUI functions such as, giving orders to units, change the weather and time of day, play sounds and display text to the player, and manipulate the terrain. The language provides an extensive API that gives programmers control over nearly every aspect of the game world.















Warcraft 3 editor