• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Which Blizz functions leak?

Status
Not open for further replies.
Level 5
Joined
Oct 27, 2007
Messages
158
TriggerRegisterAnyUnitEventBJ can be use full since it doesn't do useless stuff like lots of BJ's do. In short they just blow and its better to avoid them totally.
 
Level 21
Joined
Aug 3, 2004
Messages
710
One set of blizzard.j functions you don't have to avoid, since they don't have a native equivelant, unless you want to redo their system, is the TriggerQueue natives. Also, best way to find the native version of bj's, is to use TESH that comes with NewGen, since it highlights BJ's, and if you ctrl+left click them, it'll show you the full BJ function, and then you can usually copy out the parts you need.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Damned.

More work for me.

Not necessarily, some natives are easier and faster to use than BJs. You'll see once you get used to using natives that it's the right way to go.

Also, cinematic BJs are useful, moreover, they have to many function calls inside them so it isn't worth replacing them (a worse thing than an ordinary BJ is a BJ calling another BJ).
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
And then there are timers <3

Also, cinematic BJs are useful, moreover, they have to many function calls inside them so it isn't worth replacing them (a worse thing than an ordinary BJ is a BJ calling another BJ).
However, they are horribly un-customizable (for example, you have to recode them to get rid of pressing Esc to skip a cinematic sequence)...

The only BJs I tend to use are:

TriggerRegisterAnyUnitEventBJ: Shortens code by a good deal
RAbsBJ/RMinBJ/RMaxBJ: There is no better way to do this without variables and an if-statement, which are sometimes undesirable.

That's about all I can think of.
 
Level 21
Joined
Aug 3, 2004
Messages
710
If you're using NewGen i'd suggest something like this instead of BJDebugMsg
JASS:
function Echo takes string s returns nothing
    call Cheat("DebugMsg: " + s)
    call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, s)
endfunction
It's 10 function calls faster, and it writes the debug message to "logs//war3erruser.txt". :) Very useful.
 
Level 5
Joined
Oct 27, 2007
Messages
158
Only for debugging, never in an actual game :p (And who cares about efficiency when you're debugging)

Mindy, who cares about the efficiency of your debug messages -.-


Well maybe you don't, but I do. He's simply right about efficiency... :hohum:
 
Level 8
Joined
Jul 23, 2005
Messages
329
But you don't need to be efficient in a non-released map. BJDebugMsg can primarily be used to make sure that a piece of code is actually running, or a number is what it's supposed to be. Since I'm pretty sure you want neither in your final release, efficiency doesn't matter.
 
Status
Not open for further replies.
Top