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
964
- 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
964
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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top