Home   Help Search Login Register  

Author Topic: Using config file/nearObjects to find bullets or projectiles?  (Read 1358 times)

0 Members and 2 Guests are viewing this topic.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Hey there. Wasn't sure if this was advanced enough for advanced, so I just posted it here.

The question is fairly simple. I want to find any near bullets (of the "B_556x45_Ball" type) to a unit. Easy as that. I've checked out seven's (I think?) Suppression Script, but it simply uses the typical names of the various bullets used by west/east forces (so the west forces check for i.e. "B_545x39_Ball" whereas the east check for the above, + other bullets). This obviously won't work with addons that have their own magazines and their own "bullet types". So the question is:

What is the most "base" class of bullets/projectiles that can be used together with for instance nearObjects to find them? I haven't spotted anything in the WIKI or in the listings here on OFPEC; maybe I'm just blind.  :dunno:

Thanks!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Code: [Select]
hint format["%1", configName(inheritsFrom (configFile >> "CfgAmmo" >> "B_556x45_Ball"))]
"BulletBase" for bullets.

Shell type ammo derives from "ShellBase".
Rockets from "RocketBase".
Missiles from "MissileBase".

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Yes, but ALL bullets inherit from class BulletBase, east, west, north, south and all points between.

However, BulletBase inherits from BulletCore, but I supppose the 'base' class for bullets should be viewed as BulletBase.


Planck
I know a little about a lot, and a lot about a little.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Much obliged!

Strangely enough, using nearestObjects doesn't work, whereas nearObjects does. Ah well. We'll see if I can get the thingamajog I want to get working working.  :good:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"