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
399
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.

      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