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 The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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