[bf1942] registerhandler, last param is for?
thiessen at alum.mit.edu
Mon Jul 25 11:00:26 EDT 2005
I haven't heard or seen anything yet to indicate what it is. It isn't
necessarily a "bool" though--Python doesn't even have a boolean data
type, so calling it "unknownBool" is a bit misleading. Whatever it is,
it *is* unknown, though. All we know for sure is:
* In the DICE code supplied with BF2, some handlers are registered with
a "1" in that parameter position, and others have nothing, so it's an
* Courtesy of grep, in the DICE code, all handlers are registered
WITHOUT a "1" in that position, EXCEPT
* The TimeLimitReached is a special case; in some places in the DICE
code it is registered with a "1", and in others it's registered with no
* The handlers I've tried to register don't work unless a "1" is
present. (There are some handlers that I haven't been able to get to
work whether I use "1" or nothing, such as PlayerHealPoint,
PlayerRepairPoint, and PlayerGiveAmmoPoint--not sure what's going on
with them). I routinely use a "1" just for "good luck", even with the
event types listed above that DICE does *not* use a "1" with, and my
handlers catch the desired events just fine.
I've seen different theories as to what the parameter might be, but so
far it all seems speculation, with no evidence.
Has anyone discovered the secret of the mystery parameter yet?
--Forrest (aka "Woody")
Giel van Schijndel wrote:
> Does anyone have the slightest idea where unknownBool in this
> declaration stands for?
> Because some scripts don't seem to work without it set to 1. Because
> I'm just wondering wether it would or would not require to simply put
> it to 1 by default on all event handlers.
> host.registerHandler('EventName', eventHandler[, unknownBool])
> European Tactical Battlefield Forces
More information about the Bf1942