Starting JASS

Ayanami

칼리
Reaction score
288
Not sure if this is the right place to post this, but here goes. Officially starting from today, I've started learning JASS. I've read about 4 tutorials from this site. I get all the basic stuffs, like what a function is, about use of loops, local variables, etc. However, I'm not quite sure what I should do now. Do I read more tutorials or start on something more practical?
 

SineCosine

I'm still looking for my Tangent
Reaction score
77
Umm..
I think what I did last time was to just think of some spell and then Google around until I figured out how to do it in Jass and just code it from scratch.

So, make the spell packs that you're so awesome with in Jass xD
That should help you learn much more quickly.

[EDIT]
Then, when you're done with it, post your code up in the forums and ask for critique ._.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
A good thing to do is convert and optimize* any GUI spells/systems you've made.

(*Optimize meaning remove BJ's, make MUI/MPI, etc)
 

BlackRose

Forum User
Reaction score
239
A good thing to do is convert and optimize* any GUI spells/systems you've made.

(*Optimize meaning remove BJ's, make MUI/MPI, etc)

NO. Don't do that. That's terrible! You're better off just recoding the entire thing -- when you know how to. I would ust practise, open unprotected maps (Blizzards (Some have JASS)) and look for examples. Try start making simple stuff (Spells?) and try move on to make them MUI or something using hashtables...

But you'll WANT NewGen, it's a must... the highlighting, the non-crashing syntax checkor, and stuff like that.

- Blah, just my senseless nonsense.

(Loops are basically For Each Integer A)
(Start by making something simple, like, like, a area stun! Dummy unit to cast warstomp).
 

SineCosine

I'm still looking for my Tangent
Reaction score
77
I am absolutely sure that Glenphir will (Or already has) get used to Jass quickly.
Telling him to make simple things wouldn't help him learn much =/

[EDIT]
Use T32 for the knock-back, gogo!
 

BlackRose

Forum User
Reaction score
239
You can try that and we can check :) Go for it :p

Any errors just post.

Well then, you never know.... make a generic Knockback then :p Not too simple IMO. Not too hard IMO.
 

Crazy_Dead

New Member
Reaction score
24
Want to learn vJASS or JASS?

Anyway:

I learned from reading others systems(spells), and use alot of [ljass]call BJDebugMsg("My Msg")[/ljass]. :thup:
 

Bribe

vJass errors are legion
Reaction score
67
Normal BJDebugMsg can be frustrating to work with. I use my own debugging module to run complex behaviors that get repetitive to type each time. This is vanilla JASS; does not require any preprocessors:

JASS:

// ~~~~~~~~~~~~~~~~~~~
// Debugging utilities
// ~~~~~~~~~~~~~~~~~~~
//
//  Place this module at the top of your map script for precedence.
//
//
//  Functions:
//
//
//  call DebugMsg("test")
//  ---- Displays a debug message very neatly.
//
//  call DebugHandle("last created unit", bj_lastCreatedUnit)
//  ---- Displays "null" if agent does not exist, or displays its handle id.
//
//  call DebugBool("activator", active)
//  ---- Displays "true" or "false" on a boolean.
//
//  call DebugInt("count", i)
//  ---- Faster way to debug an integer.
//
//  call DebugReal("damage", r)
//  ---- Faster way to debug a real value.
//
//  =============================================================================
    
    
    function DebugMsg takes string s returns nothing
        call DisplayTimedTextToPlayer(GetLocalPlayer(), 0.00, 0.00, 60.0, "|cffa0522d#\n#   |cffbbbbbb" + s + ".|r\n|cffa0522d#")
    endfunction
    
    function DebugHandle takes string s, agent a returns nothing
        if( a == null )then
            call DebugMsg(s + " is 'null'")
        else
            call DebugMsg(s + " is '"+I2S(GetHandleId(a))+"'")
        endif
    endfunction
    
    function DebugBool takes string s, boolean b returns nothing
        if( b )then
            call DebugMsg(s + " is 'true'")
        else
            call DebugMsg(s + " is 'false'")
        endif
    endfunction
    
    function DebugInt takes string s, integer i returns nothing
        call DebugMsg(s + " is '"+I2S(i)+"'")
    endfunction
    
    function DebugReal takes string s, real r returns nothing
        call DebugMsg(s + " is '"+R2S(r)+"'")
    endfunction
    
    
//  =============================================================================
 

Bribe

vJass errors are legion
Reaction score
67
Why would you think that's useful? I'm curious. A debug should only be tested singleplayer, hence GetLocalPlayer() is perfect.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Ok, the first step would be creating simple text message on your screen. :)
The second step would be creating an effect on units.
Third step, learn struct.
Next? Try to creating some damaging stuffs and take a look at those simple spells(no timer, for sure).
Next? Optimize your spells with efficient coding. :)
Don't touch the timers first, you will learn it bit by bit. :)
Any problem? Feel free to ask.
 

13lade619

is now a game developer :)
Reaction score
398
ok here's what i use vJASS for that GUI doesnt.. i think you'll find them useful too.

1) Better group handling, you may use the loop or the filter styles for more efficient group handling.

2) Timer Systems, whether it utilizes function or method callbacks theyre always useful for periodic effects.

3) Indexing Systems, every spellmakers friend and somewhat an upgrade to handle vars. You can assign multiple values/properties on a unit and then pass them to any other triggers or functions. Very useful for buff/activation tracking.

4) Projectile/Effect Systems, if you want some cool visuals for your spells they're the way to go.

and lastly, what's different in vJASS from GUI is that there are more resources for you to use out there that other people had made.
lack of such systems in GUI makes it more tedious to code.

and for me making use of others' systems doesnt make you any less of a spellmaker, it saves you time.
but if you want to code every single effect/dummy movement in your spells then go ahead.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
yeah you should get NewGen cause it practically does half the work (due to highlighting 'n stuff)

I suggest to do instant spells first (so you don't have to use structs and timers to make them MUI)

my first spell was AoE sleep (Slithice's ulti)

ofc it was bad since I created the dummies dynamically and used the FirstOfGroup() function

do simple stuff first, try to make codes as optimized as possible and when you get used to it, start doing more advanced things

Hmm, is a simple knock back spell do-able?

it is if it doesn't have to be MUI
 

tooltiperror

Super Moderator
Reaction score
231
Can I recommend you use an autoindexer for it?
 

Ayanami

칼리
Reaction score
288
Thanks for the replies guys. I guess I'll go for an instant spell first then, something like a mass sleep ;)
 

tooltiperror

Super Moderator
Reaction score
231
Thanks for the replies guys. I guess I'll go for an instant spell first then, something like a mass sleep ;)

Make sure you remember to null everything. And structs will make everything easier if you decide to use them.

JASS:
//! fix alignment
  struct Data
      integer tick
      string model
  endstruct 
  function Something takes nothing returns nothing
      local Data data1=Data.create()
      local Data data2=Data.create()
      set data1.tick=343615
      set data2.tick=6235
      set data1.model="some//model//path//dot.mdx"
  endfunction
 

Ayanami

칼리
Reaction score
288
Make sure you remember to null everything. And structs will make everything easier if you decide to use them.

JASS:
//! fix alignment
  struct Data
      integer tick
      string model
  endstruct 
  function Something takes nothing returns nothing
      local Data data1=Data.create()
      local Data data2=Data.create()
      set data1.tick=343615
      set data2.tick=6235
      set data1.model="some//model//path//dot.mdx"
  endfunction

Could you do a quick explanation of a struct? :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top