JASS: Moving From GUI to Jass, the Start

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Moving From GUI to Jass, the Start




0. Table of Content


0.1 Content

0.1.1 Introduction - An introduction to the tutorial and to the basics of Jass. I will explain here about the tutorial, what is it's goal and how I'm attempting to achieve it. Also a brief explanation of what Jass is and why it is better then GUI.
1.1 Introduction to the Tutorial.
1.1.1 Basic Review
1.1.2 The Tutorial’s Organization
1.1.3 Tutorial’s Explanation Process
1.1.4 Tutorial’s Requirements
1.1.5 How to read this Tutorial
1.1.6 Tags

1.1.6.1 Why use tags?
1.1.6.2 When will I use each Tag?

1.1.7 Updates
1.1.8 Final Notes

1.2 Introduction to Jass
1.2.1 What is Jass?
1.2.2 Why use Jass?
1.2.3 Writing Jass
1.2.4 Jass’ System

1.3 Conclusions
1.3.1 The Tutorial
1.3.2 Jass
1.3.3 Final words


0.1.2 Functions - Introduction to functions. What are they? How are they used and created? What are user-designed functions and native functions? What is the difference? Parameters? And more.
2.1 User-Defined function
2.1.1 Functions and GUI
2.1.2 Functions’ Goals
2.1.3 Creating a Function

2.1.3.1 Parameters’ Syntax
2.1.4 Functions as Blocks
2.1.5 Returning

2.2 Blizzard’s Functions
2.2.1 Blizzard Functions and GUI
2.2 Blizzard Functions and User Functions
2.2.3 Calling Functions

2.3 Conclusions
2.3.1 Conclude User-Defined Functions
2.3.2 Conclude Blizzard Functions
2.3.3 What next
2.3.4 Again, Calling
2.3.5 Functions in Math


0.1.3 Variables - A whole part dedicated to variables, how to use them, when, why. Globals, locals, comparisons, and setting them to new values.
3.1 Introduction to Variables
3.1.1 Variables in GUI
3.1.2 Variables in Jass
3.1.3 Warning

3.2 Global Variables
3.2.1 Using Global Variables
3.2.2 Globals in Jass
.2.3 Locals and Globals

3.3 Local Variable
3.3.1 Introduction to locals
3.3.2 Creating Locals
3.3.3 Setting Values
3.3.4 Comparisons

3.4 Conclude Variables
3.4.1 Globals and Locals
3.4.2 Variables in Jass


0.1.4 Special Actions - This chapter will talk about the special actions which are If / Then / Else and Loop orders. Those are two important actions, read about them in this chapter!

4.1 Introduction to Special Actions
4.1.1 What are Special Actions
4.1.2 The Dangers
4.1.3 Multiple Use

4.2 If / Then / Else
4.2.1 Introduction to If / Then / Else
4.2.2 If / Then / Else’s Syntax
4.2.3 Examples
4.2.4 Elseif
4.2.5 Uses of If / Then / Else

4.3 Loops
4.3.1 Introductions to Loops
4.3.2 Loops’ Syntax
4.3.3 Normal Loop
4.3.4 Other Loops

4.4 Special Actions Conclusions
4.4.1 Special Actions
4.4.2 Conclude If / Then / Else
4.4.3 Conclude Loops


0.1.5 What's Next? - Suggesting on how to keep learning Jass after this tutorial. Short part but does what it needs.​

1. Introduction

Here you will find an introduction to the tutorial itself as a written script and to Jass. This is the least important part however I suggest reading it to make sure we are all on the same level before going into the tutorial itself. Skipping over this chapter could cause you to be confused later on. I HIGHLY suggest that you read the other tutorial I wrote, as it can ease your reading through this tutorial greatly, reading it first would make the learning path much shorter and easier to cross. Before Jass

1.1 Introduction to the Tutorial

1.1.1 Basic Review
This tutorial came to attempt to teach the basics of Jass. Indeed there are already tutorials on this, however in this one I’ll try to explain what other tutorials seemed to be a bit unclear. I’ll take other points of view in explaining and do my best to get you started with the basics of Jass.

1.1.2 The Tutorial’s Organization
The tutorial is divided into parts, chapters, sub-chapters, notes / lists & additions. The left integer presents the part’s number, then a dot and then the chapter’s number, after that the sub-chapter's number. Notes / lists & additions do not appear as a number.

Long additions may be expanded into sub-sub-chapters. If so, their number will be included.

Parts would be bolded and underlined (B and U) chapters bolded (B), sub-chapters underlined (U) and additions Italic (I).

1.1.3 Tutorial’s Explanation Process
Well, basically the way I will attempt to teach Jass in this tutorial is by constant reference to GUI. Each subject will be learned deeply and each subject will be reviewed and compared to a similar function in GUI. This way, the GUIers of you could read this tutorial more easily. This is what Daelin partly attempted to do in his tutorial, but I’ll take it one step forward and make the whole tutorial (or most of it) something sort of like Jass vs GUI.

Note: GUI is Graphical User Interface. Usually when working with triggers you are dealing with either Jass or GUI. Jass is the script language, while GUI uses charts to ease the working process with Jass (more of this later).

1.1.4 Tutorial’s Requirements

Well, there are none really I guess, you should have at the very least basic knowledge of GUI, no need for more than that. The tutorial is in English, so obviously you need to know how to speak English well. Oh, and a common sense wouldn’t hurt, I would hate answering questions such as, “Why is the tutorial so darn long?”

1.1.5 How to read this Tutorial

There is not doubt this is a long, tiring tutorial (believe me writing it was hard as well ;-) ) this is why I organized it into so many parts, chapters and sub-chapters, you can easily stop somewhere, take a rest, and then continue from the same place. All you’ll need to do is to look at the chapter’s headers to remember what was discussed already and you are good to go.

I do not recommend reading this whole tutorial at once, it is long, hard to read and generally tough; take few rests between the chapters, that way you could let the information “sink into your brain” better.

Also I suggest reading everything, skipping on something might make it harder for you to understand the rest of the tutorial. If you really don’t want to read something, because you don’t think it is important enough or something like that, at least read the conclusion at the end of every part.

1.1.6 Tags

While reading this tutorial you will meet 2 type of tags, code tags and Jass tags, both will be used in order to represent codes and functions.

JASS:
Hello, Im a Jass tag, how are you?


Code:
Look, I’m a talking code tag!

1.1.6.1 Why use tags?

Tags allow me to represent the tutorial in a clearer way for you to read. First it distinguishes between a code and the tutorial which will usually include explanation. Secondly tags allow me to write long lines without expanding the page’s width, so you will not have to keep scrolling to the sides. Example:

Code:
 This is a really long line. Am I talking about anything here? No this is just an example, isn’t it? Well let’s just see what happens when this gets really long… Ok this is long enough!

Finally, when using tags I can put spaces before the line, this will make the presentation clearer.

JASS:
          So many spaces. Wow! 
                                                              And few more.
                                                                                                      You got the idea I hope?


1.1.6.2 When will I use each Tag?

I will use Jass tags to represent most of the functions and Jass scripts in the tutorial. Code tags will be used in order to represent GUI codes and Jass codes where certain lines will need to be highlighted.

1.1.7 Updates

Each update will be recorded here, also I will bump this thread when any update occurs. Note that I will record only major updates, fixing something like “jsut” to “just” will not be recorded. If I will fix many spelling / grammar record then I will state something like: “update: major grammar and spelling fixes”

Current Version: 1.0

Version 1.0
- First release of the tutorial

1.1.8 Final Notes

Here is list that includes a few final notes about the tutorial.

  • English is not my native language; I should note that at first. I’m using a dictionary and a spell checker, so most errors should be fixed however if you spot any problems please know that it was made out of ignorance and not out of laziness to re-read the tutorial (actually I read every part about 3 times). If you find a critical error I would appreciate it if you would point it out.

  • I would love to hear comments about the tutorial, negative, positive, whatever, any comments would be great. However, I worked very hard on this tutorial, so if your feedback is negative, try to put it politely please. If you have any questions please do ask them.

  • If during the tutorial you don't understand something, don't be frustrated, Jass is hard to learn and for some people it is harder to than for others. Re-read whatever you don't understand, and if you still don't understand skip it and return to it after finishing with the tutorial. I also strongly suggest to read this tutorial at least twice to make sure you understood everything completely.

  • I worked on this tutorial about a month, so, take that into account when commenting… I don’t mean to say you must say this is a wonderful tutorial, but try not mocking me by saying “This tutorial sucks!” etc. If you learned something from it, appreciation post could only make me feel better. ;)

  • The tutorial is broken into several parts because it is too long for thehelper.net to store it in only one post, so I had to divide it into few posts, sorry about that!

1.2 Introduction to Jass

Here is a brief explanation of what Jass is. Most of the things I will talk about are technical; I will not talk yet on how Jass really works. Also, since I did this in another tutorial of mine, please excuse me if I quote myself, I simply have already put it in a clear way, no need to fix what works fine.

1.2.1 What is Jass?

Quoted from Before Jass.

Like any other software, World Editor needs to read script to know what to do, everything else but the script is simply to ease the script writing. So, for example, when you are making “regular” trigger you use Graphical User Interface (known as GUI). What World Editor does is convert your triggers (and everything else, but that’s something else) into script and then reads it. Do you want a proof? Fine, create a new trigger and do something with it. Say create a trigger that will create a footman in the middle of the map for player red every second. Now select the trigger, go to Edit > Convert to text and see what you get, that’s Jass. This is the true scripting language of World Editor, whenever you work with GUI it is converted to the text you see here, and then when playing your map, Warcraft’s engine can read it.

In other words we can say the World Editor must take script in order to execute orders. When we are working with GUI (normal triggers) World Editor takes the data given, converts it into Jass, and then works from there. Let’s create a simple trigger together, something like this:

Code:
Untitled Trigger 001
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl

This trigger will basically create a special effect in the middle of the map every 2 seconds. Now select the trigger you created and go up to edit. In edit go and click on Convert to Custom Text.

Jass1-1.jpg


A warning message will appear on the screen saying that the trigger could not be converted back into GUI. Actually you can convert it back to GUI by pressing on Ctrl + Z but that doesn’t matter at the moment. Now you should be able to see this text:

JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call AddSpecialEffectLocBJ( GetRectCenter(GetPlayableMapRect()), "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 2 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction


This is Jass, looking like gibberish? It should at the moment, don’t worry. By the end of the tutorial you should be able to understand it.

So, as you can see, GUI is converted to Jass, and we can say that Jass is World Editor’s true scripting language, and GUI is nothing but a tool to edit it.

1.2.2 Why use Jass?

Again, allow me to quote myself from my tutorial Before Jass.

  • Typing is faster then clicking - It was tested and proven that it is faster to write in the computer then to use your mouse and clicking it. So technically Jass is faster to use, because you write scripts. In GUI however, you use charts and click on your picked values.

  • Jass can do more things - In Jass there are functions (events / conditions / actions) which you can’t find in GUI. Blizzard didn’t convert all of its functions into GUI from Jass because a few were unsafe, or simply Blizzard thought they weren’t needed.

  • Jass’ functions are faster - Not only that Jass has more functions, but usually when working with Jass you use natives functions (certain types of functions) which are fast, while in GUI usually you work with BJs (other type of functions) which are slower then natives.

  • Jass does things faster - Not only are Jass’ functions faster, but Jass can also do things faster. Because of the clumsy way GUI is organized, everything is limited, however in Jass because of the flexible system you can do things with many fewer lines and functions calls. Also because of that it is faster to write Jass (well at least after you are familiar with it).

  • Jass takes less memory - Well this is hardly noticeable, but yes, Jass takes less memory space, especially because it uses locals and not globals. Also with Jass you can remove all leaks, while in GUI you can remove none (well you can remove some by using Custom Script, but not all even with that).

  • Jass is MUI - Because Jass uses local variables (a special kind of variable) you can easily create MUI spells and triggers with it.

  • Better Loops - Jass’ loops are much more flexible like most things in Jass and allow us to have complete control over them and use them in the best way possible.

  • Systems with Jass - Most of the systems now days (or at least the more advanced ones) use Jass, not only because it is easier to work with Jass but because systems can be used the best with Jass only (we can call new user defined functions with Jass ).

  • Jass is easier to read - Once you know Jass well enough it is easier to read, and to edit than GUI, it makes sharing of triggers, spells and systems easier and better.

  • People use Jass - People move to Jass. Lately many tutorials were written that ease the learning by much, so many people decide they can spend the time on learning Jass and work with it, you wouldn’t want to stay with GUI while the rest of the mappers make products for Jass.

  • Jass is powerful - Finally, most of the interesting finds about World Editor are about Jass, GUI is too simple to work on, however some amazing stuff was discovered about Jass that completely changes the programming experience. For example the return bug (well now few problems were found with it but oh well), using conditions as actions and many more things that relate to Jass but not at all to GUI.

So we can assume that Jass is better than GUI from those finds I guess. The real question that you should be asking yourself is if it’s worth putting all this effort to learn Jass. Well, as shown, Jass is by far better than GUI, if you have the time to learn Jass, you should learn it, no doubts. Few people feel like they want to master GUI completely before moving to Jass. That’s fine, GUI can be learned in less than a month, and after that in order to advance you’ll need to learn Jass.

1.2.3 Writing Jass

There are few ways to write Jass, each one has its own upsides and downsides.

  • World Editor - As you can see you can convert triggers into custom text in World Editor by selecting them, and then going to edit and convert to custom text (see the image above). Well you can convert an empty trigger to Jass and start working from there.
    Upsides: World Editor gives you the basic functions; without them you need to keep rewriting them. Also you can test your trigger much more easily.
    Downsides: There are 3 problems with World Editor’s syntax checker. A) It is stupid. B) It returns false errors, and even the true errors it can't put clearly. C) Little mistakes may cause it to crash.

  • Notepad - The simplest answer, you don’t need to down anything, just open notepad and start working. Don’t use “Word” though, because it’s pages’ length is limited, notepad’s pages can get very wide.
    Upsides: You don't have to deal with annoying World Editor, and nothing needs to be download, just get into notepad and start working!
    Downsides: No way to know easily if you have errors in your script, plus it might look unclear and plain.

  • Software - There are few programs out there that can aid you in scripting in Jass.
    TESH - A nice add-on to World Editor, makes it easier to work with it, however I found it a bit buggy. Warmly suggested if you don’t want to keep switching between two windows.
    JassCraft - My favorite tool, everything you need comes with it: colored text, accurate errors finder (more or less), function list and detailed information about functions. There are few others programs, but they similar to those two. Jass Shop Pro or Jass Editor are 2 other possible programs for you to use.
    Upsides: It really depends on what program you are using, but they usually come with a lot to help you with, such as colored text, better errors finder, list of functions and so on...
    Downsides: None really, the only thing that might irritate you a bit is the fact that you’ll need to keep switching between your program’s window and World Editor’s window.

1.2.4 Jass’ System

Now we start talking seriously, all of this was merely an introduction. Let’s examine a second trigger in GUI. GUI’s triggers are made of events, conditions and actions. Once any of the events is met the trigger will run, if all the conditions are met the trigger will precede to the actions part, which is the main part of the trigger and will do something. For example this trigger:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Triggering unit)) Equal to Peasant
    Actions
        Unit - Kill (Triggering unit)

This is pretty clear, the event is that a unit is attacked, the condition is that it’s a peasant so the trigger will only run if it is a peasant and the action is to kill the attacked unit. Jass is not made of actions, conditions and events but from functions. Each function can do anything really. It can be an action or part of it, Boolean or Boolean expression, something that returns an integer, a function that will do something to a given group… Anything really. This makes Jass much more flexible, because we don’t have the usual order of event, condition & action but function, function and & function, each one of those can do about anything I tell it. In other words:

GUI is made out of events, conditions and actions, and those three are stored inside a whole trigger which stores them all. That’s why GUI is so easy to edit and work with, but it makes it very limited. Jass is made out of functions, each function can serve as event, condition, action, part of one of those three, or something else completely. This makes the working process faster, easier and more flexible.

1.3 Conclusions

A quick conclusion of this part.

1.3.1 The Tutorial

The tutorial is made to help you learn the basics of Jass while continuing to compare it to GUI. The tutorial is divided into many parts, chapters and sub-chapters to make the reading process easier.

1.3.2 Jass

Jass is the source language of World Editor and GUI is nothing but a tool to help us edit Jass. GUI will be converted to Jass so the game can read it; however by working directly with Jass we benefit a lot more. The way Jass works is from many functions that can be formed into many triggers, systems, spells etc.

1.3.3 Final words

Final words before the (long) introduction ends:

I hope you will enjoy this tutorial I worked on this very hard to try and teach you this stuff so please take that into consideration. All questions and comments are more than welcomed.

I hope you enjoy your reading, or at least learn something from it!

Tutorial’s author: Rheias.

The tutorial itself is in the second post, so keep reading. Credits to Ghan_04 for fixing grammar mistakes.
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Second Post:

2. Functions

In this chapter I will introduce you to functions. I will talk about two types of functions, blizzard made functions and user-defined functions. Both types are similar but we usually use them to achieve different goals. Here is a tutorial I did about functions, however it is a bit advanced so I suggest reading it only after you are done with this tutorial.

2.1 User-Defined function

2.1.1 Functions and GUI

Before we start learning about functions let's talk about them quickly. As said in the introduction, differently from GUI, Jass is made out of functions where each function can do whatever I tell it to do. It can be an action, condition, event, part of those or something else completely. In GUI however we have only events, conditions and actions, and that’s it. Do you remember the trigger we converted? Let’s take another look at it.

JASS:

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call AddSpecialEffectLocBJ( GetRectCenter(GetPlayableMapRect()), "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 2 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction


Here we have two functions, function call Trig_Untitled_Trigger_001_Actions and the other is call InitTrig_Untitled_Trigger_001


Code:
[B]function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing[/B]
    call AddSpecialEffectLocBJ( GetRectCenter(GetPlayableMapRect()), "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
endfunction

//===========================================================================
[B]function InitTrig_Untitled_Trigger_001 takes nothing returns nothing[/B]
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 2 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

You see those now? Let’s check what each function does.

The first function (Trig_Untitled_Trigger_001_Actions) is the action part of the trigger; here we put the actions that are made to the trigger. The second function is more unique. That function creates the trigger, and attaches the events & actions to it.

So we can see here an example of 2 functions, one that does certain actions and the other that creates the trigger and attaches the actions to it. It might be a bit hard to understand so I will try to put it in other words.

Unlike GUI where the event and the conditions call the actions if they are met, in Jass we have many different functions that each do something different. Those functions call each other and form in this way a trigger.

This sub-chapter was just to give you the feeling of function in Jass, soon it will become clearer.

2.1.2 Functions’ Goals

Functions, as said, make Jass, everything in Jass is made out of functions and from them, every command you wish to transfer to the game will happen in a function. When creating a function we always need to keep in mind that it does something. In other words each function is its own block of code, and this block of code together needs to do something, else it is useless. As said functions can do many, many things if we build them correctly, but no function can work alone, in order to create a working World Editor product we need to connect functions, not just build them; this will prove very important later on.

2.1.3 Creating a Function

So in short functions are blocks of code that do something, everything in Jass needs to be in a function so it can be read, now let’s see how we can create one of those functions.

Functions’ Syntax:

Code:
[b]function[/b] name [b]takes[/b] parameters [b]returns[/b] value

The bolded words must be put down as written, the others vary.

Function - We put this to begin our function by creating a line, if you forget to state “function” at the start World Editor will have no idea what to do. It will not understand this as a function defining line unless we put the word "function" in the start.

Name - You need to state the name of the function; to refer to a function you name its name. The name mustn’t start with integers and can’t have signs in them (such as ? ! : “ etc…). Replace spaces with _. The name is case sensitive, thus calling a function BLAH is different from name it blah or Blah or bLaH etc. You can’t name 2 functions with the same name.

Takes - From now on (until we state “returns”) we give the function parameters to work with (see later the sub-chapter “Calling Functions”).

2.1.3.1 Parameters’ Syntax

The parameters’ syntax is as follows:

Code:
ParameterType ParameterName

ParameterType is the type of the taken parameter. Types can be integers, strings, reals, Boolean, trigger, timer, unit, player, item and so on. ParameterName is the name of the taken parameter, in order to refer to the parameter inside the function you will use ParameterName. Note that you can’t name two parameters with the same name inside a function but you may in different functions. Parameters’ naming rules are like the function names’ ones. If a function takes more than one parameter we separate the different parameters with a comma. Example:

JASS:
 integer i, unit a, player blue, real number33998, item Wowish_thing


In case you want your function to take no parameters state “nothing”.

Returns - After we write returns we need to decide if the function will return something.

Value - The value is what returned by the function. Value can be anything that is ParameterType (look at sub-sub-chapter above - 2.1.3.1). Again, if you wish your function to take nothing simply state “nothing”.

Here are few examples of functions:

JASS:
 function This_Is_An_Example takes integer test, unit triggerer, player owner returns real


JASS:
 function eXaMpLe_2 takes nothing returns unit


JASS:
 function Tutorial takes real x, real y, returns location


JASS:
 function One_More takes location l returns nothing


JASS:
 function last_one takes nothing returns nothing


So, you know how to basically create a function, now let’s take a quick look at what is inside the function (it will be described in much more detail later on).

2.1.4 Functions as Blocks

This will be a short sub-chapter to discuss how functions look; later on I’ll go much more deeply into this.

So after you created a function (as described in the sub-chapter above - 2.1.3) you need to define it so it would do something. You’ll need to write lines of Jass (which will be explained later) that will order the function to do something; after you are done with that you need to close the function. This could be done by creating a new line and writing in it “endfunction”.

JASS:
function close takes nothing returns nothing
endfunction


This function for example will be created and immediately be closed so it would do nothing, a proper function would look like this:

JASS:
function close takes nothing returns nothing
// A jass line
// Another one
// So on until what you want is achieved
endfunction


Note: "//" starts a comment, comments are ignored by the syntax checker so we can add notes about the code.

2.1.5 Returning

As said functions may return something, it can be anything that is parameter type. Now lets see how we return it really.

JASS:
 function example takes nothing returns integer
    return 5
endfunction


You see? This function will return 5.

JASS:
 function another_ExAmPlE takes unit u returns unit
    return u
endfunction


This function doesn’t really do anything because it takes a unit and returns the same exact unit, so this is useless just an example.

So you should understand how returns works. However you need to remember something very important, once Jass reads the word return it stops executing the function which means:

JASS:
 function blah takes nothing returns integer
    return 4
    return 16
    call CreateUnit()
    return 579079
endfunction


The function above will only return 4 and nothing else.

Tip: If you want to skip remaining actions in a function (like GUI) all you need to do is create a new line and type "return" this way the function will stop executing itself because, as said, once a function meets return it will stop running.

2.2 Blizzard’s Functions

2.2.1 Blizzard Functions and GUI

Blizzard functions (or natives (there are BJs as well but let’s ignore them for the time being)) are what allows us to deal with Jass. Everything that you do in GUI is actually converted into a native (or BJ, but as I said I’m ignoring those now). Once a native function is called it does something. For example when you want to create a unit you call native that creates a unit. Do you want to show all players the message “blah, blah”? You are again using a native.

In other words we can say that natives execute orders given, those natives let the game know that we want to do a certain action and so the game reads it. Continue reading to see how you tell a native what to do!

2.2.2 Blizzard Functions and User Functions

So we understand that Blizzard functions need to do something, although User Functions are created so we could do something inside them. In other words we create User Functions, and inside those function we put Blizzard Functions that execute the wished orders. However User Functions sometimes supply information to the blizzard functions, so don’t think those user functions are useless, they are very important in organizing the code in the map and executing everything in the game time and properly.

Now, much like user functions take something and return something. Differently from user functions though, they must do one of those things, you will never see a Blizzard function that takes nothing and returns nothing.

Let’s go on to the next sub-chapter then!

2.2.3 Calling Functions

We call Blizzard function the same way we call user-designed functions, you should keep that in mind. Now when calling a function we need to follow this syntax:

Code:
[b]call[/b] FuncName[b]([/b]Parameters[b])[/b]
As you can see we call a function when stating the word call. Doesn’t it remind you something? Oh yeah, when we created user-designed functions we had to start the line by stating “function”, well here we switch “function” with “call” (as in calling a function). After that we put the function’s name, which is how we refer to functions. After that is done we open parentheses, put down the parameters and close them.

Now let’s talk about the parameters. When we put a parameter down the only thing we must do is refer to it, thus giving its name, but not its type. If we put several parameters we separate them with commas.

Here is an example.

JASS:
 function DisplayTextToForce takes force toForce, string message returns nothing


We can see that the function called DisplayTextToForce takes a force (player group) and a string and returns nothing. What this means is the syntax to this function would be.

Code:
 [b] call DisplayTextToForce ([/b]force,string[b])[/b]

Let’s give an example.

JASS:
 call DisplayTextToForce(GetPlayersAll(),Hi, this will display this message to all players")


You got the big picture? Not sure? Let’s put it in other words, when calling a function (user-defined or blizzard one) we put down “call TheNameOfTheFunction(The thing the function takes and does with them something)”. If we would compare this to GUI thing when adding a new function, say Game > Display Text you need to tell what player-group you want to show the text to, and what string they should see. This is the same thing only that here we separate parameters with commas and it’s in Jass.

Note: If a function takes nothing leave the brackets empty.

2.3 Conclusions

2.3.1 Conclude User-Defined Functions

So we can say that we create a user-defined function by putting “function” then the function’s name, what it takes and what it returns. Once a function created we can call it like any other Blizzard Function. In a user-defined function we put lines of Jass that tells it what to do.

Everything when working with Jass must be in those function, each function must have different name.

2.3.2 Conclude Blizzard Functions

Blizzard function take something and return something, much like user-defined functions, however differently from those, blizzard functions must do one of those two. While user-defined functions store in themselves blizzard functions, blizzard functions are the ones that do the real work and execute orders given.

By know you should understand the taking part of function, a function takes certain parameters in a certain order, and when it takes those it can do with them something. The returning part will be discussed in more little in the part regarding local variables.

2.3.3 What’s next

Just a brief review on what I will talk about next. Since I talked already in general about the biggest difference between Jass and GUI there is not much left. I will discuss variables, triggers, special actions (loops & if/then/else) and after that I’ll do a short chapter on how to continue by yourself, the tough part is behind you!

2.3.4 Again, calling

For all of you that may have problem with understanding how to call a function, this short sub-chapter will attempt to conclude what I said about calling functions and putting it in other words.

When you want to do something in GUI what are you doing? You are going to the events / conditions / actions tab and from the many charts there pick an option. For example to create units. Now, once you picked the action to create units, you need to let the computer know few things right? For example how many units, of what type, to who player, where and so on. In Jass basically it works the same way, you put “call” and then type the picked command (funcname) open brackets and put parameters down so the computer, again, will know what to do. Also, like GUI, in Jass there is a certain order where you need to put it. The only difference is that you type everything and you put commas between parameters.

2.3.5 Functions in Math

One thing that helped in understand function after looking back is comparing them to math. Lets take Pi. Pi returns 3.14(and infinite number after the 4), so when thinking about it in Jass it’s a function that takes nothing and returns real, right?

JASS:
 function Pi takes nothing returns real
    return 3.14
endfunction


now lets thing about multiplying, of course we can multiply normally (integer1 * integer2) however if we would want to make a special function for it then:

JASS:
function multiply takes integer a, integer b returns integer
    local integer counter = 1
    local integer ConstantA = a
    loop
        exitwhen counter > b
        set a = a + constantA
        set counter = counter + 1
    endloop
    return a
endfunction


I don’t expect you to understand what was inside the function, however you need to understand that this function will take 2 integers multiply them and return the result.

3 Variables

In this chapter I will discuss fully variables in Jass. Global (normal) variables, locals, comparisons, and finally setting new value and, all of those would be discussed in this chapter.

3.1 Introduction to Variables

3.1.1 Variables in GUI

In GUI there is only one type of variables which is called “global”. You can open the variable’s tab by clicking on ctrl + b. Once opened you can create a new variable by defining its type and name (the name follows the same rules as the functions’ name follow). For example you can crate a variable on type integer, that has the name VarInt. Variable’s type is just like parameter’s type.

Now what those variables actually do, is storing value of their type in them. For example a variable of type integer could store integers (1,5,39398,number of units in the map, the player’s id… Anything that is an integer) unit variable could store units (triggering unit, picked unit, last created unit… Any unit) and so on. Once we store information inside a variable, we could later on refer to the variable and get the stored information in it. For example after 30 seconds started in the game you want to check the number of units in the map, and after another 30 seconds see if there are more or less units now. This could not have been done without a variable, however by storing the number of units after 30 seconds in a variable and then referring to the variable after a minute could make it possible.

One last thing about variables, variables can have arrays. Arrays are indexes, which are presented inside []. So for example Some_Variable[0] can store different value then Some_Variable[1], however they must store the same type of value. You can think of an index as an addition to the name which is represented by an integer so we could get a better use of it (for example loops).

3.1.2 Variables in Jass

In Jass we have two types of variables. One type is the global type as mentioned above and will be discussed later in greater detail, and the local type which is basically the same thing but more limited. This limitation of the local variables allow us to achieve with them many things, yes the limitation is in some way a benefit.

3.1.3 Warning

If you are very new to GUI and have no idea what variables are, I don’t suggest reading this without practicing variables in GUI. It takes certain way of thinking to understand variables, which can be easily understood with some practicing so I suggest you work on that before going on and reading. Just create triggers and check out variables’ powers in them.

3.2 Global Variables

3.2.1 Using Global Variables

As said, there are variables, one type is locals and one type is called globals. Let’s talk about globals. Global variables store inside themselves information, and they will keep that information until the end of the game, unless you change it. For example you can store in a variable called IntVar the integer five, and then change it to seven. From the time you stored the fine in the variable until you stored seven, referring to the variable will return five. Afterwards it will result seven because we changed the value to something else.

Now, we said that you can create globals in the variables tab, where you give a variable a name and a type. If you want to refer to a global variable in Jass you need to follow this syntax:

Code:
 udg_[b]VariableName[/b]

So say we talk about the IntVar again, in order to refer to it in Jass we will put:

JASS:
 udg_IntVar


“udg” stands for “User Defined Global”, and the “_” is just a space.

3.2.2 Globals in Jass

One thing you must understand is that once you stored an information inside a global variable, no matter where, when or how whenever this variable will be referred to it will return the information stored in it, kind of like a function that takes nothing and returns something (and that something is stored in the variable). You can refer to a global variable in any function. This means another thing, if you changed the value of the global variable in one function it will affect all other functions that will use the variable later on, if you want to avoid that you’ll need to create few variables, or possibly adding an array to the variable.

Now, a question that you might ask yourself is how do I use global variable? Well as I said in order to refer to it you put udg_VarName, but one thing I didn’t make clear yet is that variables are used only as parameters. Variables can’t execute and order or something like that, because the only thing that they can do is store a certain value and then when needed return it, thus the only time you would use variables is to use them as parameters.

As for arrays (indexes) they are represented inside a []. So:

JASS:
IntVar[0]


It a variable called IntVar and its 0 index. You must remember that you can't use array in a global that wasn’t originally created with an array (inside the variables’ tab).

Reminder: To those that don’t remember parameters are passed to functions (blizzard ones, or ones made by users) so those functions could use the information that the parameters pass to execute certain orders.

3.2.3 Locals and Globals

Before I start talking about local variables I’ll give a brief introduction to it here while comparing it to global variables. Locals, unlike globals are created especially for the function. They are like parameters taken by the function if you will; they can be used only in a function and can’t be referred to from other functions. While this seems like a limitation we can benefit from it. Say we use a function with wait inside it, how can we know for sure that the variables we are using won’t change their values during this wait and then ruin the whole function? The most common example is spells, say you store few parameters in variables once the spell is being cast and then you use wait. Think if another unit will cast the same spell during the waiting time, the previous variables will be overwritten and the spell will be ruined. This is why locals can come in handy, because locals change their values only in the functions were they where created in, we can avoid data being lost.

Note: Spells that can be cast without fearing this data overwriting are call MUI. In case you are using arrays to represented players, but still it is not MUI you call the spell MPI.

3.3 Local Variables

3.3.1 Introduction to Locals

As said, local variables are different from global variables because globals can change their value in any function and will affect all other functions while local variables change their value only in one function. You can think of locals as parameters that you give to a function, it something that the function may refer to. You may use the same name for two locals if they are in different functions, else they must be named differently. Also locals should be named the same as parameters.

Now, let’s explain in more detail how locals work. You can create local variables inside functions, once you do that you can store in those information. But the fact that you need to create locals in every function separately and that they change their value only within the function they were created in, locals are like globals in anyway. Local variables store information that can later on be restored by referring to them. Of course we can use arrays in locals as well.

3.3.2 Creating Locals

The syntax to create locals is as follows:

Code:
 [b]local[/b] localType local_name

Local: The local is like “function” and “call” you simply tell Jass what this line will do, in this case, create a local variable.

localType: The local variable’s type, just like parameter type, locals can store only values that are like their type.

local_name: the name of the local variable, you type the local’s name to refer to it. Follow functions’ names rules. Examples:

JASS:
 local unit triggerer

JASS:
 local integer eight

JASS:
 local trigger exe

JASS:
 local real x

JASS:
 local player picked


And so on, those are nothing but examples. Of course you may have any number of locals you want in a function, you can have none, you can have dozens, it is very flexible.

Something very important to remember is that locals must be declared in the start of the function, you may not do anything before all locals are defined.

Legal:
JASS:
function ok takes nothing returns real
    local unit something
    local real other_thing
    return real
endfunction


JASS:
function legal takes unit u returns nothing
    local unit u_copy = u
endfunction


Illegal:

JASS:
function wrong takes play p returns nothing
    local unit p // You have parameter and local with the same name!
    local integer s
    local real s // 2 variables with the same name!
endfunction


JASS:
function X takes nothing returns nothing
    local unit blah
    call DisplayTextToPlayer()
    local item t // An action is executed before all locals are defined
endfunction


Now say we want to add indexes to a variable, how do we do that? As always, simple syntax to follow.

Code:
[b]local[/b] LocalType [b]array[/b] local_name

Just squeeze in the word “array” between the local’s type and it’s name.

Important: Once adding an index to a local variable you must ALWAYS attach an index to it (local_name[integer]). Same goes to global variables by the way.

3.3.3 Setting Values

Now, locals aren’t any good if we don’t set a value to them, right? Again, follow the following simple syntax to store a value inside a local.

Code:
[b]set[/b] local_name [b]=[/b] value

Simple? Yes.

Set: Like “function”, ”call” and “local”, we define the line’s type.

Local_name: The local’s name which we want to store the value into.

=: After that we put the value which needs to be stored.

Value: Value is a parameter, it is stored inside the local. The value’s type must match LocalType of the local, else errors will pop.

Examples:

JASS:
local unit x
set x = GetTriggerUnit()

JASS:
local integer id
set id = GetPlayerId(GetTriggerPlayer())

JASS:
local real p
set p = 0.373


Etc.

Now, do you see the examples above? What do we do? We create a variable in one line, and the in the other line store a value inside it. Wouldn’t it be nice if we could do it in just one line? Well guess what, Blizzard thought about it, you can do it.

Code:
[b]local[/b] LocalType local_name [b]=[/b] value

Pretty simple, aye? What we are doing is merging the creation line and the setting line into one that does the exact same thing. Fun, huh? So the three example above can look like:

JASS:
local unit x = GetTriggerUnit()


JASS:
local real p = 0.373


Note: We can set values to globals easily the same way

Code:
[b]udg_[/b]global_name = value

3.3.4 Comparisons

Now let’s talk about comparisons. We can compare variables easily to each other, usually this will be used to check certain conditions (is X > Y etc…). When comparing two variables they must be of the same value (is a player bigger then a unit?.. What?!) unless we are talking about integers and reals.

JASS:

X > Y // Checks if X is greater then Y. Only integers and reals.
X < Y // Checks if Y is greater then X. Only integers and reals.
X >= Y // Checks if X is bigger or equal to Y. Only integers and reals.
X <= Y // Checks if Y is bigger or equal to X. Only integers and reals.
X == Y // Checks if X is equal to Y. All variable types.
X != Y // Checks if X is not equal to Y. All variable types.


3.5 Conclude Variables

3.4.1 Globals and Locals

We have two types of variables. Globals, which are created in the variables’ tab (ctrl + b). Globals can change their values everywhere, and when they do change their value they affect all functions that use them. Locals are created inside a function and can change it’s value only within this function. This limitation (allegedly) can help us keep a function working, doesn’t matter what happens in game, so changes won’t effect it.

3.4.2 Variables in Jass

Variables in Jass look pretty similar to ones in GUI. Of course you need to create locals (at the START of the function), but other then that we got the same things, setting, using as parameters and comparing. Of course the syntax is different but you get the idea.

4 Special Actions

In this chapter I will talk about two very important actions, if / then / else and loops. Both can do great things if used wisely (as you probably know from your GUI experience) but you need to learn them!

4.1 Introduction to Special Actions

4.1.1 What are Special Actions

Special actions allow us to do things that usually we couldn’t have done, each one of those is very important for the coding process, without the special actions, Jassers were doomed to make boring, simple codes.

There is the If / Then / Else action, that allows us to check if a condition is true. If it is then we do one things, if it isn’t then we do other thing. The loop action allows us to repeat one action several times until we order it to stop.

4.1.2 The Dangers

Special actions have few problems in them. They can cause crashes in-games when called or even crash World Editor upon saving if they are handled incorrectly. Make sure you follow the instructions posted to stop those events.

4.1.3 Multiple Use

Before I’ll go into explaining in more detail what each one of the special actions do, you need to note that you can use special actions inside special actions as much as you want, there is no limitation to that.

4.2 If / Then / Else

4.2.1 Introduction to If / Then / Else

If / Then / Else (I/T/E) action allows us to put a condition and two set of actions. The I/T/E action will check if the condition is true. If it is then the first set of actions will be executed else the other set will be.

4.2.2 If / Then / Else’s Syntax
As always in Jass we got a syntax to follow.

Code:
[b]if[/b] condition [b]then[/b]
    then actions
[b]else[/b]
    else actions
[b]endif[/b]

If: Yup, like the others (“function”, ”call” etc.), defined the line.

Condition: The action will check if the condition is true, if it is then the first set will be executed, else the other one will.

Then actions: If the condition is true this set of actions will be executed by the game.

Else: Separates between the first and the second sets of actions

Else actions: The second set of actions which will be executed only if the condition was false.

Endif: Ends the I/T/E actions.

IMPORTANT(!!!): Forgetting to put the “Endif” will result a World Editor crash when saving the map. Triple check that every I/T/E actions is closed by the “endif”.

IMPORTANT(!!!): Something that many people don’t know is that a function must return something out of an I/T/E actions. What that means is that if you have a function that returns something, it can return a value inside the I/T/E block, but at least one returning line must be outside this block

Last thing to say is that if you want the I/T/E action to do nothing if the condition is false you can drop the “else” line. So this works:

JASS:
if condition then
    actions
endif


4.2.3 Examples

Well, that’s was short because If / Then / Else is powerful, yet easy. Here is an example

JASS:
function ITE_Example takes player user returns nothing
    if user==Player(0) then // Checks if the player taken by the function is player red
        call SetPlayerState(user,PLAYER_STATE_RESOURCE_GOLD,500)  // Sets’ the player’s gold to 500
    else
        call SetPlayerState(user,PLAYER_STATE_RESOURCE_GOLD,100)  // Sets’ the player’s gold to 100
    endif
endfunction


Easy, huh? This function takes a player, if the player taken is player 1 (red) then the game sets the player’s gold to 500. If the function takes another players then it sets the player’s gold to 100.

4.2.4 Elseif

The is something called Elseif. Say you want to do the following:

JASS:
if 1 == 1 then
    actions
else 
    if 1==2 then
        actions
    endif
endif


You can short this block to:

JASS:
if 1 == 1 then
    actions
elseif 1==2 then
    actions
endif


Simple as that.

4.2.5 Uses of If / Then / Else

So, you know perfectly well how to use If / Then / Else, the question is, when and why to use. Well, say you want to check in the middle of the trigger if a certain condition true to affect you actions. Well without If / Then / Else you had no simple way of doing it, however now you can, by simply typing “if condition then actions else actions” (of course you can drop the else actions as said). Otherwise, us Jassers would be in a bit of problem. ;)

4.3 Loops

4.3.1 Introductions to Loops

Loops are also great actions. Loops allow us to repeat certain set of action again and again until a certain condition is met. There are classic loops that run X amount of times (from 1 to 10 times) and other loops, which are more flexible that can follow other type of conditions.

4.3.2 Loops’ Syntax

The loops’ syntax is as follows
Code:
[b]loop
    exitwhen[/b] condition
    action set
[b]endloop[/b]

Loop: Starts the loop, all action between loop and endloop will be executed several times.

Exitwhen: After exitwhen we put a condition that will order the loop to stop looping when it’s met.

Condition: The condition that will stop the loop once it is true.

Action set: The actions that will be executed several times

Endloop: Ends the loop (much like endif)

IMPORTANT(!!!): Forgetting to put Endloop at the end, will cause World Editor to crush, like forgetting to put Endif.

4.3.3 Normal Loop

If you think about GUI, usually the loop run certain amount of times, from integer X to integer Y, right? This can be done easily in Jass, following this general syntax:

JASS:
local integer start = // The starting integer.
local integer end = // The ending integer.

loop
    exitwhen start > end // This will stop running the loop once start is bigger then end
    Actions here
    set start = start + 1
endloop


Do you understand what’s going on? We store two integers in two locals, one is the starting integer of the loop, and one is ending. After that we add a condition that says “Stop the loop and start is bigger then end”. Then, what we do is after each loop run, we increase the starting integer by one.

4.3.4 Other Loops

And then we have other loops, in the exitwhen we can put any condition that will be checked every loop run, what means you can put whatever condition you wish and the loop will run until that condition is met. You can tell the loop to run until some player have some amount of some resource, or make the loop run until a unit dies… Whatever, you can put it all there.

4.4 Special Actions Conclusions

4.4.1 Special Actions

So special actions can either check if a condition is true, and knowing that affect our actions (If / Then / Else) or run a set of actions several times until a condition is met (loops). You will find yourself using both a lot, because they can make the coding experience, faster and more efficient.

4.4.2 Conclude If / Then / Else

If / Then / Else action, like its name, allows us to check IF a condition is true. If it is THEN we do one set of actions, ELSE other set. That helps us change our actions if needed by simply checking if certain conditions return true or false, quite effective.

4.4.3 Conclude Loops

Loops allow us to repeat action several times until an action is met. If used wisely we can make loops run until we need them to stop, by modifying the exitwhen condition. Also, if we use regular loops (start > end) we get an integer that keeps increasing it’s value, what can make the actions a little different each time.

5 What’s Next?

Well you are through with the most basic things, there is yet much for you to learn, but you know the basics now. First of all, check my tutorial Before Jass, it explains in great detail on how to learn Jass.

However I will explain also here in short how to learn as well.

Now that you know the basics of Jass you need to do three things.

  • Learn new commands - You need to learn commands (Blizzard functions) to do things in Jass, as said they execute orders, but you need to learn what they do, their names, what parameters they take and in what order. There are two ways to do that. One it to convert GUI triggers to Jass, or a better way is to download one of Jass’ programs and search in the list there for actions. More on this in the link above! Also you can find in my tutorial links to other tutorial that teach Jass, highly suggested that you read them too, to understand things I didn’t talk about them here.

  • Practice, practice, practice - Yes! Practicing is the key to learn Jass, you must get better with it, do things faster, get better understanding of things and so on. With practicing you can understand things alone, be able to write and understand Jass better, learn new tricks and so on. Don’t be lazy!

  • Moderate Knowledge - After you did the previous two steps, go to my tutorial and check the many links there for more advance tips that can improve your coding, slowly you’ll learn many new things that will allow you to do many complicated things and master Jass better.



Thanks for reading my tutorial, please comment on it.
Rheias 16.7.07(DD.MM.YY)
 

Knights

You can change this now in User CP.
Reaction score
71
Oh snap you wrote this?

Musta taken a long time! Looks well thought out etc, I'm gonna read it over now..

Should be on the Tutorial section btw, where you submit tutorials.
Knights:cool:
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> arent this a tutorial?

Yes...

> Should be on the Tutorial section btw, where you submit tutorials.

Ah, right, I keep forgetting about that forum... Oh well, I'm sure a mod will move it.
 

Estel3

New Member
Reaction score
6
EDIT: Very awesome tutorial. I will need to read it in portions since its so huge but I love it. Great (and 5-Star!) job!
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
woah...this is ....Long....
I will read this tomorrow..-_-
Now is sleep time and i'll giv comment about the tut next day
:)
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> This looks incredibly detailed and also very very helpful. I will read over this and edit my post later with thoughts.

Thanks.

> woah...this is ....Long....

31 Word pages here, Times New Roman 12. ;)
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Everything that you do in GUI is actually converted in to a native (or BJ, but as I said I’m ignoring those now).

Hmm. Natives and BJ's aren't really the same. A BJ is its own function block that will, in turn, call one or more native functions.

I think, at least as far as the work you put into it, you put all other tutorials to shame. However, some may not want to spend the time needed to read the whole tutorial. (Me, for example. :p I just skimmed it.) But if someone would, they would learn a lot. :D Nice job!
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> Hmm. Natives and BJ's aren't really the same. A BJ is its own function block that will, in turn, call one or more native functions.

Or it calls another BJ. I know that of course (if I didn't know that, I wouldn't have enough knowledge to write this ;) ), the thing is, if you are begginer, would you want me to start messing your head with good functions or bad functions? Use this not that? You should learn it later on, it doesn't help to learn Jass, it is more advanced, no need to talk about it at the moment.

> I think, at least as far as the work you put into it, you put all other tutorials to shame.

I'm flattered :eek:, thanks I did put lots (and LOTS) of hours into this. :)

> However, some may not want to spend the time needed to read the whole tutorial.

A lot of my time I spent trying to make it shorter, but I wanted to go over a lot of things, while of course keep refering to GUI, what made this kind of BIG tutorial. But as I said in the introduction, you can read and stop and read again becuase the tutorial is orginized into many sub-chapters, it is easy to remeber where you stopped and by looking at the previous titles remember what you learned already.

> But if someone would, they would learn a lot. Nice job!

Again, thanks, good to hear you think that my work didn't result another useless tutorial. :)
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
715
Wow, I think I'm clairvoyant. I posted a basic JASS tutorial as well, almost at the same time! Didn't notice yours before I posted mine. We're using even the same example, "AddSpecialEffectLocBJ". How rad is that?

ANYWAY, this is fairly comprehensive a bit too long, though. I mean, most of the people who want to learn JASS want to create magnificent spells in no time and they don't bother to read long tutorials. But that does not mean your tutorial is bad, oh no. It's excellent for someone, who has the time and patience to truely learn something.

As a note, I personally am against of learning from GUI to JASS conversion. These lead to wrong beliefs and inefficient coding. But hey, that's just me.

Anyway (wow, I said it for the second time), you could get rid of the center alignment from the table of contents and use the default font, as well. Makes easier to read.

I like the other formating, though.

Good job.
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> I posted a basic JASS tutorial as well, almost at the same time!

Lol, I just noticed it too.

> this is fairly comprehensive a bit too long, though. I mean, most of the people who want to learn JASS want to create magnificent spells in no time and they don't bother to read long tutorials. But that does not mean your tutorial is bad, oh no. It's excellent for someone, who has the time and patience to truely learn something.

Personally I'm againts people that think "Jass is cool, where's the shortest tutorial out there?", this tutorial covers everything you need to know to start learning Jass alone, yes it is long, but if one is serious, I think he can dedicate few hours to learn Jass. By the way, this tutorial isn't much longer then Daelin's / Vexorian's.

> you could get rid of the center alignment from the table of contents and use the default font, as well. Makes easier to read.

I disagree, it turned messy, long and very hard to read when I did all of it in the same size and in the left, but I just might be odd, if anyone agrees Andrewgosu please say so and I'll change it.

> Good job.

Thank you. :)
 
I

IKilledKEnny

Guest
Couldn't you post it few monthes ago when I was learning JASS? :p Good stuff here, nice tut.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Couldn't you post it few monthes ago when I was learning JASS?

Me, too! It would have been good for me, as well. :p
 

Estel3

New Member
Reaction score
6
ANYWAY, this is fairly comprehensive a bit too long, though. I mean, most of the people who want to learn JASS want to create magnificent spells in no time and they don't bother to read long tutorials. But that does not mean your tutorial is bad, oh no. It's excellent for someone, who has the time and patience to truely learn something.

Maybe I'm one of those people with the time and patience to truly learn something but I disagree. I don't seek the quickest way to learn JASS, I look for the most efficient. A problem I have with a bunch of tutorials is they are too SHORT that they don't go in depth enough with certain topics. However I think Rheias solved that problem with this :) !
 

Blackrage

Ultra Cool Member
Reaction score
25
>If druing the tutorial you don't understand somthing, don't be frustrated, Jass is hard to learn and for some people it is harder then to others. Re-read whatever you don't understand, and if you still don't understand skip it and return to it after finishing with the tutorial. I also strongly suggest to read this tutorial at least twice to make sure you understood completely everything.

Druing is spelled wrong :eek: ill post a bit more corrections...

>Notepad - The simplest answer, you don’t need to down anything, just open notepad and start working. Don’t use “Word” though, because it’s pages’ length is limited, notepad’s pages can get very wide.
Upsides: You don't have to deal with annoying World Editor, and nothing needs to be download, just get into notepad and start working!
Downsides: No way to know easily if you have errors in your script, pluse it might look unclear and plain.

Pluse is supposed to be plus....

>Here we have two function, function call Trig_Untitled_Trigger_001_Actions and the other is call InitTrig_Untitled_Trigger_001

That part is plural which means it is more then one. Make it "functions".

Editing later


Comment : Oh yeah, nice tutorial<3 , I'm still learning from it :D
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Thanks, when there is such a big tutorial you'll always miss something. :)
 

elmstfreddie

The Finglonger
Reaction score
203
Uhm.
Long :p
Very.. Long

The only reason it took me so long to go to JASS is because all the tutorials I found were 3 miles long (like this one). lol
 
F

FKNCrazy

Guest
Good tutorial, wasn't as long as it seemed when i scrolled through it first time. A few gramatical and spelling errors :/.
 

Hero

─║╣ero─
Reaction score
250
Very good tutorial..

5 stars..+rep

although there are many things that you did not mention :p


_______
Eh need to spread rep first
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top