• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Question about using Blizzard.j Functions

Status
Not open for further replies.
Level 7
Joined
Mar 10, 2013
Messages
366
I was looking upon some functions in the API, JASS documentation, another foruns and posts for some informations about the triggers I needed and just how the triggers work.

Some time, I've stepped on questions from people were some people gave some solutions using any Blizzard.j function and anothers pure JASS solutions.

And those using pure JASS solustions, where crapping on BJ function calling them 'ugly'.

Anyway, my question is: is there any recomendation regarding the use of Blizzard.j functions? They aren't recommended at all and should be avoided? Or it's just people saying bullshit, and I should use then in suitable situations?
 
Level 7
Joined
Mar 10, 2013
Messages
366
Just as an example, take the GroupPickRandomUnit function. Is there any reason to not use it, and use a pure JASS solution with ForGroup and random number generators instead?
 
There's not much reason to create your own function over that one.

JASS code takes up filesize in the war3map.j (although it doesn't matter much anymore) and could potentially bloat some internal tables / counters for the JASS VM.

Below is a good example of a useless Blizzard function.

JASS:
function PauseUnitBJ takes boolean pause, unit whichUnit returns nothing
    call PauseUnit(whichUnit, pause)
endfunction
 
Level 7
Joined
Mar 10, 2013
Messages
366
Thanks, TriggerHappy. I was just wondering if there was anything about good practices regarding the use of Blizzard.j, but it seems that most of then are just a waste and other than that, there's no real reason to not use them.
 
Status
Not open for further replies.
Top