• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

why does this use BJs?

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
JASS:
set udg_temp_real = LoadRealBJ(StringHashBJ("damage"), GetHandleIdBJ(GDD_DamagedUnit), udg_H_BRS_Challenge)

Is there a way to make this not use BJs and do the same thing?
 
so the non BJ version goes:
JASS:
handle(parent, child, key)

and the BJ version goes:
JASS:
handle(key, child, parent)

Is this true for all handles (reals, integers, units, groups, locations, effects) stored as hashtable keys?
 
Notice the really fun function that they kick this off with:

JASS:
//***************************************************************************
//*
//*  General Utility Functions
//*  These functions exist purely to make the trigger dialogs cleaner and
//*  more comprehensible.
//*
//***************************************************************************
//===========================================================================
function DoNothing takes nothing returns nothing
endfunction

They should've just kicked off the entire blizzard.j file with that statement.
 
Bribe, how on earth do you find searching a text file easier than simply typing the function you're looking for into the function list. Both would produce the exact same result, the function list being easier to navigate through because if you type "unit" it will give you an entire list of functions with the word "unit" in it, rather than specifying the exact name (if you don't know).

In terms of BJs, the only reason it is shunned upon is because calling functions is a slow process, and calling functions that call other functions (when the middle-man can be eliminated) produces unnecessary function calls which will slow your code down.
 
Status
Not open for further replies.
Back
Top