Page 1 of 1

[Help!][Coding]kitObject names?

Posted: 2010-05-13 18:37
by Riffraffselbow
Hey, I'm working on a custom kick script (can't say more at the moment; doesn't really matter as I'm only in the "getting all of the resources and libs sorted out" phase, as well as learning python)

In short: I want to check what kind of kit a kitObject is; how would I go about this? Let's say, just for ease of reply, that this is my current code:

Code: Select all

import bf2.PlayerManager
Example = bf2.PlayerManager.Player(0)
Examplekit = Example.getKit()
#pseudocode begins here
name = Examplekit.magicalFunctionThatRetrievesKitname()
print name
Also, what's the name of the Pilot kit? different for each faction?

In case you're wondering, I'm working from this refsheet: Object Reference - BF2 Technical Information Wiki

Is there a better, PR-centric ref somewhere?

Re: [Help!][Coding]kitObject names?

Posted: 2010-05-14 22:46
by dbzao
name = Examplekit.templateName

Re: [Help!][Coding]kitObject names?

Posted: 2010-05-15 04:51
by Riffraffselbow
[R-DEV]dbzao wrote:name = Examplekit.templateName
Thanks! I can find the next bit myself if nobody can remember off hand, but what's the name of, for example, a US pilot's kit? pr_us_pilot?

as a side note, I did see template name in the reference; for some stupid reason, I mis-interepreted it as "internal name of this individual instance", not "name of the template this object belongs to", so shame on me.