[Help!][Coding]kitObject names?

Making or wanting help making your own asset? Check in here
Post Reply
Riffraffselbow
Posts: 19
Joined: 2009-02-09 23:15

[Help!][Coding]kitObject names?

Post 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?
Last edited by Riffraffselbow on 2010-05-13 18:46, edited 1 time in total.
dbzao
Retired PR Developer
Posts: 9381
Joined: 2006-06-08 19:13

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

Post by dbzao »

name = Examplekit.templateName

"There's always one more bug." - Lubarsky's Law of Cybernetic Entomology
Riffraffselbow
Posts: 19
Joined: 2009-02-09 23:15

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

Post 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.
Post Reply

Return to “PR:BF2 Community Modding”