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.

      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