How do you actually begin learning JASS?

skyblader

You're living only because it's illegal killing.
Reaction score
159
Okay, before you come in here and say " Use the search" and stuff, what I meant was, how do you actually start using it? Because I've read the guides, I've understood the basics. But still, I don't really know how to start out, and I really need advice.
 

SYI

New Member
Reaction score
1
Well back when I used GUI, I had a map to do all my testing. It had all the necessary triggers needed (Hero revival, map vision, stuff that i wanted, etc.)

After i read some tutorials, and looked at some spells/snippets that were submitted, I made a few basic spells, then made an objective to recreate my Test Map in jass.

I would just try to get a goal in mind, of something to do in jass, then attempt it.
 

sLsIDK

New Member
Reaction score
13
I feel the same way. What I've been doing is making little snippets, like a function or two that simplify certain processes for me, or maybe a better way to make a small part of a spell MUI. I just recently started a bit with Jass and have done what you have done and am also interested in where to actually "start"
 

Nestharus

o-o
Reaction score
84
I learned JASS by just reading JASS code and then I learned the natives by using them and researching them (since nobody really wrote anything on most of them back when I was learning it).

I couldn't seem to learn from any of the guides either =). For me, I literally had to just read code. Every guide back then started by converting a trigger and that just doesn't work for me =).
 

Romek

Super Moderator
Reaction score
963
- Make a trigger which displays integers 1-10
- Make a trigger which displays 1-10 when 'ESC' is pressed
- Make a trigger which shows a units name when it dies
- Make a trigger which shows 1-10 if a footman dies. Otherwise, do nothing.

These tasks probably won't last more than a few minutes, though once you can do all of that, all that's left is to learn the natives (most of descriptive names), and additional vJass features.

If you haven't already, read this.
 

XeNiM666

I lurk for pizza
Reaction score
138
I learned JASS by Converting some of my GUI spells to custom text, them by reading some tutorials here, I will make the spell better and more efficient.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Seeing the tutorial does not help much for me. I did read people's code then learn from there.
 

Viikuna

No Marlo no game.
Reaction score
265
Make a map.


While making a map you find yourself needing to do some Jass all the time, and then you can just come to the forums and try to find tutorials or ask how something is done.


Also take advantage of modding community.

Learning Jass used to be hard back in the day, when noone but those guys in Blizzard knew how it works. The only way was to try that shit home by yourself. That is not the case anymore, thanks to the modding community which is here to help you.

Today learning Jass is really easy.
 

Romek

Super Moderator
Reaction score
963
When reading code, it helps if the code you're reading has comments in it.
Most (all) of my newer stuff has as many comments as possible within the code to help those who learn from reading code.

Though I don't know if many of that stuff has been released yet. UAC is a system with commented code anyway, so that might help. Any remakes of my spells will do in the future too.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
> Also take advantage of modding community.

Yes! Don't be afraid to ask questions. The reason behind the JASS Help board is to help people. No point in having it if no one uses it.
 

tooltiperror

Super Moderator
Reaction score
231
I did stuff like this. I made a trigger like this:

Code:
lol jass
    Events
    Conditions
    Actions
        Special Effect - Create a special effect at ((Center of (Playable map area)) offset by (20.00, 20.00)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl

Then you convert it.

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

//===========================================================================
function InitTrig_lol_jass takes nothing returns nothing
    set gg_trg_lol_jass = CreateTrigger(  )
    call TriggerAddAction( gg_trg_lol_jass, function Trig_lol_jass_Actions )
endfunction


And, then, I remove the BJ and fix it.

JASS:
function Trig_lol_jass_Actions
     local real x = GetLocationX(GetUnitLoc(GetTriggerUnit())) + 200 * Cos(72.00 * bj_DEGTORAD)        
     local real y = GetLocationY(ul) + 200 * Sin(72.00 * bj_DEGTORAD) 
     local location pc = Location(x,y)  
endfunction

//===========================================================================
function InitTrig_lol_jass takes nothing returns nothing
    set gg_trg_lol_jass = CreateTrigger(  )
    call TriggerAddAction( gg_trg_lol_jass, function Trig_lol_jass_Actions )
endfunction


Oh, ignore the epic fail of the conversion.
 

Lehona

New Member
Reaction score
12
JASS:
scope loljass initializer Init
 function action takes nothing returns nothing
 local location pc = Location(GetLocationX(GetUnitLoc(GetTriggerUnit())) + 200 * Cos(72.00 * bj_DEGTORAD) ,GetLocationY(GetTriggerUnit()) + 200 * Sin(72.00 * bj_DEGTORAD) ) //which variable is "ul" btw? Im sure you wanted to use "GetTriggerUnit()".
//Maybe some Stuff here? 
call RemoveLocation(pc)
endfunction

private function Init takes nothing returns nothing
    set t = CreateTrigger(  )
    call TriggerAddAction(t, function action )
endfunction
endscope


Even though i don't know what you want to do (You create a local location...?), that is much better (The name of the action-function is fail, because you don't do anything and I didn't know how to name it to cover your doing).
 

jig7c

Stop reading me...-statement
Reaction score
123
I would say start with Romek's idea
At first I read so many tutorials on so many sites on Jass, and I felt confident I could do some basics of it, but didn't know where to start...

I still don't know jass and I still don't know where to start, but its because I don't have enough time for JASS, i got tons of other things to do...

but the point being, when you make spells, most of the spells have similar functions like:

create a unit at some location
for each integer from 1 to 10, do
pick every unit in unit group...
remove leaks
doing damage via triggers
setting/removing abilities...
adding/removing special effects

i would say start from there, and pretty soon you'll be making your very own basic jass spells and work your way up from there!!!

create a basic spell in gui, convert it to custom text and start reading it...
 

tooltiperror

Super Moderator
Reaction score
231
@Lehona, I was rushing, so that`s what I meant at the end of the post. I realized the errors.
 

PrisonLove

Hard Realist
Reaction score
78
I started by just converting spells to JASS and using local variables to make them MUI. From there I started just optimizing spells, and then I went on to doing basic abilities.

My suggestion is, create a spell in GUI, then convert it to JASS, make it MUI, optimize it, then, if you have the knowledge, start getting funky with it and doing tricky stuff.
 

Joccaren

You can change this now in User CP.
Reaction score
54
Well, I am in the learning process of JASS, and what I find helps me most is creating the triggers that I need, and then, for MUI capability I convert them to JASS and swap everything around from Globals and default variables to locals. This forced me to find out and remember what things such as (Triggering Unit) were in JASS. Now, I just have to start learning about where to put the commas and brackets properly which shouldn't take to long.

But yeah, I'm basically doing what Romek suggested as well, learn how to create a few basic functions as once you've got the basics down, it becomes like GUI: You know what you want to type 80% of the time and you know how to lay it out. If it doesn't work or you don't know what to type, you ask here.
 

Prozix

New Member
Reaction score
7
I started by just converting spells to JASS and using local variables to make them MUI. From there I started just optimizing spells, and then I went on to doing basic abilities.

My suggestion is, create a spell in GUI, then convert it to JASS, make it MUI, optimize it, then, if you have the knowledge, start getting funky with it and doing tricky stuff.

Ehm, if you create something in GUI and do like 20 things, with if's etc. and convert it to JASS, it isn't gonna help you a lot if you are new. Converting, a really small group or a single command can help you to understand how to use it.
For me, learning JASS was more like learning how to do the things I could do in another scriptinglanguage in JASS. If you have to learn how to think as a programmer and how to solve problems, it is gonna be even harder without some proper basic programming tutorials about variables and program flow control. So how to learn this? Try to create really really basic stuff like Romek suggested, ask for help if you need it and then try to follow some basic tutorials. That should get you going.

gl!
 
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