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.
  • 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!
  • 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