vJass - I: Uncomplicating the Complicated

MagnaGuard

Active Member
Reaction score
49
Yes I think libraries put the code to the top, so it can be referenced. Think of it just like a library and can be used (taking books from the shelves). Scopes are to make each function have a different name? ;) I think.
 

Romek

Super Moderator
Reaction score
963
> So when are we gonna be hearing about the next vJass - II?
I've started writing it. Well.. the introduction. :)

> why you explained scopes but didn't say a word about libraries?
Because they weren't needed.

> when do I use scopes and when do I use libraries?
Scopes, unless you need your code to be referenced from anywhere. (Systems, mainly. Not spells).

> but I'm looking forward to tutorial about timers and structs, I'm currently stuck there xd
:)

> Scopes are to make each function have a different name? I think.
Both scopes and libraries serve the same purpose - encapsulation.
Though libraries also allow more code to the top, and execute the initializer instead of calling it. :)
 

GooS

Azrael
Reaction score
154
It looks great for a basic "I'm going into JASS" tutorial, explaining some do's and dont's, which is basically all I know about JASS/vJASS.

Anyways, here's something that seemed wrong:
set r = 1./2. // becomes 0.5. Notice the decimal point after the numbers. This -->makes<-- means there is nothing after the decimal point.

And as for an Off-topic JASS question that could easily be answered by you pro's; If I scope a spell will it still lag at first use as non-scoped ones, or will it work smooth because it's already been "initialized". I think I've read about it somewhere, but now I can't find it, and I couldn't see it in this tutorial, though it might be there.
 

Flare

Stops copies me!
Reaction score
662
And as for an Off-topic JASS question that could easily be answered by you pro's; If I scope a spell will it still lag at first use as non-scoped ones, or will it work smooth because it's already been "initialized". I think I've read about it somewhere, but now I can't find it, and I couldn't see it in this tutorial, though it might be there.
A script that isn't enclosed in a scope will function exactly the same as one that isn't enclosed in a scope, so nothing's going to change first-cast lag. Non-vJASS-enhanced scripts must be initialized also (via InitTrig_TriggerName)

However, if you Preload the stuff (which can be done with/without vJASS) using the Preload function(s) or simply creating the unit/adding the ability/creating the special effect during your initialization, first-cast lag is usually non-existant since all the Object Editor stuff, and models, have already been loaded while the map was still loading
 

SerraAvenger

Cuz I can
Reaction score
234
: )

reals can be converted to strings by using R2S.
Though it is more convenient to use R2SW( string, width, precision ) as R2S will print all the floating point digits (wich looks quite ugly), I love efficiency and shortness. I thus recommend using R2S exclusively.

; )
 

Romek

Super Moderator
Reaction score
963
> Great Job.
Thanks.

> Though it is more convenient to use R2SW...
Indeed, it is. :)
 

jig7c

Stop reading me...-statement
Reaction score
123
i'll never learn JASS, i give up... read so many tutorials, they all explain the same stuff.... takes nothing returns bulls**t

no offense to the JASS community, just disappointed in me...
keep up the good work Romek
 

Romek

Super Moderator
Reaction score
963
> they all explain the same stuff.... takes nothing returns bulls**t
What do you expect, that they'll all explain different stuff?
vJass is the same wherever you go.

> keep up the good work Romek
Thanks.

If you don't understand something, just ask.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
i'll never learn JASS, i give up...

that's the same thing I said myself at first when I started learning Jass
if you learned GUI you will definitely learn Jass too

I think that "Convert GUI to Jass" learning method is bad because it makes a very ugly and messy code with many unnecessary stuff

I suggest learning vJass instead

Romek posted a great tutorial from which you can learn a lot

if you get stuck somewhere just ask :thup:
 

Romek

Super Moderator
Reaction score
963
These are only the basics.
Though with practice, you'd probably get it all. :)
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
715
I reckon you should remove the vJASS part (libraries, scopes) and add it to your next series - 95% of this tutorial is actually about JASS basics.

It would be logical to start series 2 with encapsulation and carry on from there.


The formatting of tutorial is really nice, though, if you could seperate paragraphs with empty lines it would be even better.
For example, the native and bj part is a great wall of text.

In addition, you should bind simple sentences together.

e.g

"Natives and BJs are just like functions you declare. So they can take and return values. Natives include functions such as R2I, KillUnit and GetTriggerUnit."

Natives, such as R2I or KillUnit, and BJs are just like functions you declare - they can take and return values.


As for the content itself, the way you bring examples and explain is excellent, so nothing bad to say at all.
 

wraithseeker

Tired.
Reaction score
122
Also it would be nice to include some external links for learning and such.

Should be good if you link stuffs like Textmacros, Objectmerger and such in part 2 of this.

Sadly, I have learned vJASS already and you didn't make it back in 2006-2007... bah :eek:
 

Romek

Super Moderator
Reaction score
963
> I reckon you should remove the vJASS part (libraries, scopes) and add it to your next series - 95% of this tutorial is actually about JASS basics.
I think it's fine as it is.
Scopes are Jass basics. And I'm sure most people who learn Jass would want to get right into Jassing.
Initializers cause code to actually run, so they can experiment themselves. :)

> the native and bj part is a great wall of text.
Fixed. Walls of text are indeed ugly. :p

> "Natives, such as R2I, KillUnit, and BJs are just like functions you declare - they can take and return values."
I liked the structure of the old sentence. You're right about it not flowing well though, so I fixed that.

> As for the content itself, the way you bring examples and explain is excellent, so nothing bad to say at all.
Thanks =)

> Also it would be nice to include some external links for learning and such.
I don't think they're needed here.

> Should be good if you link stuffs like Textmacros, Objectmerger and such in part 2 of this.
No, they won't be in Part 2.

> Sadly, I have learned vJASS already and you didn't make it back in 2006-2007... bah
Oh noes. :(
Hopefully I'll get a tutorial up for the Sc2 syntax nice and early. :p
 

simonake

New Member
Reaction score
72
Great Tutorial :thup: +rep

Just a few comments.

--
  • I finally decided to start vJass :) and I must say that this tutorial is great. The only default, is that once finished to read, I can't figure out how to put all this stuff in a trigger to create a spell :(

    ...Maybe it's me.

  • I tought you didn't talked enought about the Events, I would have like to have examples.

Otherwise Good tutorial and I'm waiting the next one!!
 

Romek

Super Moderator
Reaction score
963
The 2 points you mentioned will be covered in the next tutorial.
No spells are meant to be made from this. :)

Glad you liked it. ;)
 

simonake

New Member
Reaction score
72
Well I just started vJass tonight and I always knew that when I would start vJass I would need to read a good tutorial. :)

May you take a look at my problem? Mass Entangling Root It's probally simple for you but, for me, it's the end of the world...
 

HellCraft

Member
Reaction score
19
very nice tutorial, i actually didnt know what a native is until i read this tutorial.
when will you make then second part? or is it made already? i want to learn about structs and methods, getting desperate.
EDIT: your bump actually made me learn jass :D
 
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