JASS: A Concise Introduction

Hero

─║╣ero─
Reaction score
250
Nice tutorial....

5 star rating from me

+rep

Now why couln't this be out when i started learning JASS about 1.5-2 years ago?
 

Darkchaoself

What is this i dont even
Reaction score
106
I dont believe it Ghan, im ACTUALLY leaning JASS, ive read through tons of Tuts and stuff, but this one im ACTUALLY able to learn from. Amazing. You did it.
 

Hero

─║╣ero─
Reaction score
250
I dont believe it Ghan, im ACTUALLY leaning JASS, ive read through tons of Tuts and stuff, but this one im ACTUALLY able to learn from. Amazing. You did it.

Good...now if you need help just PM me..JASS is my specialty

Oh and Good Job...just practice

Mistakes are good...they help you learn form them
 

Beetlebomb

New Member
Reaction score
43
I've read a lot of tutorials for learning Jass but this one really started to get my noggins engine rolling. Many thanks, Ghan.
 

PiCkstix

New Member
Reaction score
18
I read a JASS tutorial yesterday, but this one pwns it for the amount of things that I learnt. :p
 

Anti-krazy

New Member
Reaction score
5
I was reading through the other tut's they didnt teach ma a thing cuz it too advanced but this i actually learned something TY

Keep it up!
 
R

Remscarz

Guest
how the hell?

ok umm read this:
JASS:
set udg_IntegerVariable = 1
loop
 exitwhen udg_IntegerVariable > 5
 call DisplayTextToForce(GetPlayersAll(),Loop Number:+I2S(udg_IntegerVariable) )
 set udg_IntegerVariable = udg_IntegerVariable + 1
endloop

ok so i make a udg integer variable in the Variable tool the little X icon...
Well i rename it from udg_integervariable to udg_integer1 and when i syntax test it says this:
variable udg_integer1 is undefined.

umm wtf? i defined it... do i need to put something in?

Other then that your tutorial is the BEST one i have EVER seen!!!!
 
R

Remscarz

Guest
and suggestion

Oh and just to say
JASS:
 set gg_trg_Blank_JASS_Trigger = CreateTrigger(  )

the: set gg_trg_blank_JASS_Trigger = CreateTrigger( )
I have found it easier just to do this, because when i press sytax check it always comes up with that as an error.

JASS:
 local trigger t = CreateTrigger(  )


Isnt that easier and better? other then taking up t as a local variable.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Well, the "udg_" part gets added on by the game itself when you are using the Variable Editor.

Now, if you want to use that code segment you posted, you would create a variable called, "IntegerVariable" in the Variable Editor and use that code as it is stated.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Sorry for bumping a thread that hasn't had a post in 2 and some odd months but...
This is the best tutorial I've read so far (and this is the third one I've read so far).
I especially like how you made us (the readers) feel like part of what you were doing.
Ghan_04's Awesome Tutorial said:
Easy enough so far? Definitely.
Ghan_04's Awesome Tutorial said:
See the GetTriggerUnit()? Simple, right? It's not that hard, right? Of course not. You worried for nothing.
Stuff like that for example.
Thanks for such an awesome tutorial!

PS: I'm starting the next tutorial of yours, JASS: A Better Understanding ;) !
 

SwedishChef

New Member
Reaction score
32
How do i use JassCraft?? I searched for displaytext in native list and got this line:
Code:
native DisplayTextToPlayer          takes player toPlayer, real x, real y, string message returns nothing
Thats no action:(

E: Ok what the fuck is wrong here?? I converted trigger to custom text and it is wrong?
Original trigger
Code:
Untitled Trigger 001
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Game - Display to (All players) the text: Hi
Converted
Code:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_004" )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
The error is undeclared variable...
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
How do i use JassCraft?? I searched for displaytext in native list and got this line:
Code:
native DisplayTextToPlayer          takes player toPlayer, real x, real y, string message returns nothing
Thats no action:(

E: Ok what the fuck is wrong here?? I converted trigger to custom text and it is wrong?
Original trigger
Code:
Untitled Trigger 001
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Game - Display to (All players) the text: Hi
Converted
Code:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_004" )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
The error is undeclared variable...

You changed the name of the trigger from "Untitled Trigger 001" to something else, without changing the script. GUI does this automatically, JASS doesn't.

>
JASS:
native DisplayTextToPlayer          takes player toPlayer, real x, real y, string message returns nothing


Sure it's an action. A native function is one that just happens to be embedded into the actual game.

Here's how to use it:

JASS:
call DisplayTextToPlayer(PLAYER_VARIABLE,0,0,"STRING_MESSAGE")


the two reals (x and y) move the text around on the screen, but try to pick a number between 0 and 2 if you want to change them. Chances are, you don't need to.
 

SwedishChef

New Member
Reaction score
32
You changed the name of the trigger from "Untitled Trigger 001" to something else, without changing the script. GUI does this automatically, JASS doesn't.


Strange thing is i tried another trigger made an action and an event converted it directly and it still says that. Have restarted the editor (using NewGen) and did the same, still the same error :(.
 

wc3shady

You can change this now in User CP.
Reaction score
40
Hey I just finished reading your post, it was very helpful!

I've been putting learning JASS away for so long. It's just so daunting.

And now I get it.

Thx + rep :thup:
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
If you change the name of the trigger in the trigger editor, some other things need to happen.

JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_004" )
endfunction

//===========================================================================
function InitTrig_NEW_TRIGGER_NAME takes nothing returns nothing
    set gg_trg_NEW_TRIGGER_NAME = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_NEW_TRIGGER_NAME, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_NEW_TRIGGER_NAME, function Trig_Untitled_Trigger_001_Actions )
endfunction


See what that does for you. Just make NEW_TRIGGER_NAME whatever the name is of your trigger.
 

Carl-Fredrik

New Member
Reaction score
51
This is the best JASS tutorial I've read in my opinion, it made me interested in learning JASS and now i use it as often as I can :) Not without troubleshooting sometimes though, of couse ^^
 

WolfieeifloW

WEHZ Helper
Reaction score
372
This, and Ghan_04's other tutorial, are what I used to learn JASS.
Well written, clear and concise;
Makes the user feel like a part of what (s)he's doing, instead of just "do this, then this, then this...".
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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

      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