Functions With BJ

Toriad

New Member
Reaction score
4
What does the BJ mean

GetBlahblahlbah vs

GetBlahblahlbahBJ

They take same arguements, i just dont get it.
 

woot

New Member
Reaction score
8
They are functions that blizzard made to more easily use the blizzard native functions


some of them merely swap variables around... others perform mathematical equations, or allow you to input different variables... like a Location instead of X and Y coordinates..


one of them leaks .. (TriggerRegisterAnyUnitEvent)

generally .. don't use them unless you have to .. most often they are just a waste .. but usually all they do is take 1 more function to call a function which isn't that bad..


you can see exactly what the functions do in Newgen world editor by control clicking the BJ functions (they show up in red)
 

AceLegend90

New Member
Reaction score
6
If you use NewGen, the BJ functions are marked in red, and when you look at them in the Function List, you'll see them with actual code that more or less calls native functions.

Some BJ functions are helpful, typically the mathematical ones because you really don't want to put down the whole formula over and over again.

The problem with BJ functions is that they call other functions, meaning it has to transfer the system over multiple functions, which can slow the game down enmass.

The commonly used BJ function, TriggerRegisterAnyUnitEventBJ, leaks because it passes a null boolexpr in TriggerRegisterPlayerUnitEvent call in that BJ function. To eliminate this problem, create your own TriggerRegisterAnyUnitEvent function and a ReturnTrue function that always returns true and use that function for the boolexpr instead of null. Null boolexprs leak.
 
Reaction score
341
BJ = Blizzard JASS I believe. Bassicly they call to other natives supposely to make your coding easier , which in some cases its true. But most its not.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Some leak.

Some cause desyncs (disconnections).

All perform very slightly slower.

They might be easy, but with the riscs up above, I wouldn't take my chances. :p
 
Reaction score
456
> All perform very slightly slower.
Yes, but it's not good to inline every single bj.
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
True, the cinematic BJ's can be quite useful. Allows you to use 1 function instead of 30+ lines of other code.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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