Talk:Game Engine Object Templates
From BF2 Technical Information Wiki
Just wanted to point out that using bf2.objectManager.getObjectsOfTemplate('us_medic')
will not return any active medic kits. When a kit is in use by a player, it no longer shows up in the tuple returned by bf2.objectManager.getObjectsOfTemplate
. From what I've observed kits go something like this:
- Round Starts: 64 kit objects are created for each kit template and added to the kit list.
- Player Spawns: When a player spawns they are given the last kit in the kit list, and now the kit list has one less kit in it.
- Player Drops Kit: When a player drops a kit, it is added back to the bottom of the kit list. If it is picked up before it disappears it is off the kit list again. If it disappears (or is lost by dying in a vehicle), the kit is deleted, and a new kit object is added to the bottom of thekit list to take its place.
NOTE: By kit list I mean the tuple returned from using bf2.objectManager.getObjectsOfTemplate
on that kit template.
So, if there are 10 us medics in a game, bf2.objectManager.getObjectsOfTemplate('us_medic')
will only return a tuple of 54 kit objects.
--King of Camelot 18:53, 6 Aug 2005 (MDT)