oh yeah almost forgot...
[R-DEV]fuzzhead wrote:Unless someone figures a way, there is no easy way to make ammo for medic bag with the properties suggested here.
I dont have much time atm and I may try this later but in theory...
Heres the code for the bag...
rem ---BeginComp:ReplenishingAmmoComp ---
ObjectTemplate.createComponent ReplenishingAmmoComp
ObjectTemplate.ammo.magSize -1
ObjectTemplate.ammo.changeMagAt 1
ObjectTemplate.ammo.minimumTimeUntilReload 0.5
ObjectTemplate.ammo.abilityDrain 0.1
ObjectTemplate.ammo.abilityRadius 1
ObjectTemplate.ammo.abilityStrength 3
ObjectTemplate.ammo.abilityCost 0
ObjectTemplate.ammo.abilityMaterial 73
ObjectTemplate.ammo.replenishingType RTHeal
ObjectTemplate.ammo.onlyActiveWhileFiring 1
Maybe if you changed "ObjectTemplate.ammo.magSize -1" to something positive?
If that doesn't work (which i wouldn't be surprised at all if it doesn't from what I know about BF2 code
You could also try having the "medipack weapon" instead of directly healing by using healing projectiles that would be (in a sense) similar to the healing patches.
Code for patches(the russian ones for those who care):
ObjectTemplate.create GenericProjectile medikit_dressing_ru_Projectile
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.createNotInGrid 1
ObjectTemplate.createdInEditor 1
rem ---BeginComp:StickyCollisionComp ---
ObjectTemplate.createComponent StickyCollisionComp
ObjectTemplate.collision.bouncing 1
ObjectTemplate.collision.maxStickAngle 60
ObjectTemplate.collision.stickToVehicles 0
rem ---EndComp ---
rem ---BeginComp:ReplenishDetonationComp ---
ObjectTemplate.createComponent ReplenishDetonationComp
ObjectTemplate.detonation.triggerRadius 1
ObjectTemplate.detonation.triggerType MTYPco
ObjectTemplate.detonation.replenishingType RTHeal
ObjectTemplate.detonation.replenishingStrength 25
rem ---EndComp ---
rem ---BeginCompefaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp :d efaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 0
ObjectTemplate.penetrate.allowLiquidPenetration 0
rem ---EndComp ---
ObjectTemplate.geometry medikit_dressing_ru
ObjectTemplate.setCollisionMesh medikit_dressing
ObjectTemplate.mass 10
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 73
.
..
.
ObjectTemplate.animationSystem1P Objects/Weapons/Handheld/Medikit_dressing/AnimationSystem1p.inc
ObjectTemplate.animationSystem3P Objects/Weapons/Handheld/Medikit_dressing/AnimationSystem3p.inc
ObjectTemplate.projectileTemplate medikit_dressing_ru_Projectile
ObjectTemplate.keepProjectiles 10
ObjectTemplate.velocity 1
ObjectTemplate.itemIndex 8
ObjectTemplate.delayToUse 2.608
And to make it work I would change
ObjectTemplate.hasMobilePhysics 1 -> 0
ObjectTemplate.hasCollisionPhysics 1 -> 0
ObjectTemplate.velocity 1 -> 0
delete "ObjectTemplate.geometry medikit_dressing_ru"
and "ObjectTemplate.setCollisionMesh medikit_dressing"
change ObjectTemplate.detonation.replenishingStrength 25 -> alot lower
and then in the player weapon code for it (ill put in the patches code here)
rem ---BeginComp:ThrownFireComp ---
ObjectTemplate.createComponent ThrownFireComp
ObjectTemplate.fire.altFireInput PIAltFire
ObjectTemplate.fire.fireLaunchDelay 0.9
ObjectTemplate.fire.addFireRate 0
ObjectTemplate.fire.projectileStartPosition 0.06/-0.12/0
ObjectTemplate.fire.maxProjectilesInWorld 1
ObjectTemplate.fire.showWeaponAfterReloadDelay 0.05
ObjectTemplate.fire.pullBackTime 0
ObjectTemplate.fire.projectileStartRotation 30/210/160
rem ---EndComp ---
rem ---BeginComp :d efaultAmmoComp ---
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.ammoType 1
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 1
ObjectTemplate.ammo.reloadTime 2.608
ObjectTemplate.ammo.minimumTimeUntilReload 0
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.instantReloadOnEnable 1
ObjectTemplate.ammo.toggleWhenNoAmmo 1
rem ---EndComp ---
add this:
ObjectTemplate.fire.roundsPerMinute 900 (just a geuss as to the proper fire rate)
Change this:
ObjectTemplate.fire.addFireRate 0 ->2 (semi auto -> full auto for the non code literate)
ObjectTemplate.ammo.nrOfMags 1 -> -1
ObjectTemplate.ammo.magSize 1 -> whatever you want the max amount of healing to be
Make these bigger :
ObjectTemplate.fire.fireLaunchDelay 0.9 -> however long it should take to start healing
ObjectTemplate.fire.maxProjectilesInWorld 1 -> 10
-----------------------------------------------------------
ENGLISH TRANSLATION
-----------------------------------------------------------
you could try making the medic bag into an ACTUAL projectile that shoots less effective invisible patches that don't obey the laws of physics at an automatic rate of fire.
I know it
may work because for the carrier catapult i made you shoot invisible
implosive bullets that don't obey the laws of physics at a
burst rate of fire in a similar manner.
I know most of this is speculation and I will try it when i get time but I would rate the second idea imo as probably possible and if so somewhat difficult to implement probably involving alot of animation and sound effect work to recreate the medibag as a projectile weapon.
Peace.
ps. sorry bout all the code >.>
pps. the answer is most definitely 42