Finite Medikit
Posted: 2013-07-17 20:43
I tried to create a finite medikit that can get reloaded from common ammo supplies. My approach is having a weapon that fires mini field dressings, but there is a problem with that: you can always fire this weapon and you lose information if your patient is healed or not.
To solve this i made it a burst weapon that fires as many projectiles to heal a patient fully.
This is how it looks so far. All numbers need tweaking obviously.
Currently there is a problem with the animation, need to fiddle with that.
I also tried to do the same for the wrench but to no success. I just used same code and replaced material of the projectile to 84 (engineer ability material) and the trigger to MTYVehicle. Any idea why its no repairing vehicles?
To solve this i made it a burst weapon that fires as many projectiles to heal a patient fully.
This is how it looks so far. All numbers need tweaking obviously.
Code: Select all
rem *** Generated with Bf2Editor.exe [created: 2005/3/23 15:53]
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe GenericFireArm medikit
ObjectTemplate.creator FLI-1:fli
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.setNetworkableInfo HandFireArmsInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.castsDynamicShadow 1
ObjectTemplate.cullRadiusScale 10
rem ---BeginComp:WeaponHud ---
ObjectTemplate.createComponent WeaponHud
ObjectTemplate.weaponHud.selectIcon Ingame\Weapons\Icons\Hud\Selection\Medkit.tga
ObjectTemplate.weaponHud.specialAbilityIcon Ingame\Weapons\Icons\Hud\SpecialKitIcons\medkit.tga
ObjectTemplate.weaponHud.hudName "killed"
ObjectTemplate.weaponHud.guiIndex 115
ObjectTemplate.weaponHud.altGuiIndex 0
ObjectTemplate.weaponHud.showClips 0
ObjectTemplate.weaponHud.disableOnSprint 1
rem ---EndComp ---
rem ---BeginComp:SingleFireComp ---
ObjectTemplate.createComponent SingleFireComp
ObjectTemplate.fire.roundsPerMinute 60
ObjectTemplate.fire.addFireRate 1
ObjectTemplate.fire.firelaunchdelay 1
ObjectTemplate.fire.burstsize 10
rem ---EndComp ---
rem ---BeginComp :D efaultAmmoComp --
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.ammoType 1
ObjectTemplate.ammo.magSize 100
ObjectTemplate.ammo.nrOfMags 1
rem ---EndComp ---
rem ---BeginComp :D efaultSoundComp ---
ObjectTemplate.createComponent DefaultSoundComp
ObjectTemplate.sound.noisy 0
rem ---EndComp ---
rem ---BeginComp :D efaultAnimationComp ---
ObjectTemplate.createComponent DefaultAnimationComp
rem ObjectTemplate.animation.loopingFire 1
rem ---EndComp ---
ObjectTemplate.geometry medikit
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.aiTemplate medikit_ai
ObjectTemplate.material 74
rem -------------------------------------
ObjectTemplate.addTemplate S_medikit_Fire1P
ObjectTemplate.addTemplate S_medikit_Fire1P_Outdoor
ObjectTemplate.addTemplate S_medikit_Fire3P
ObjectTemplate.addTemplate S_medikit_BoltClick
ObjectTemplate.addTemplate S_medikit_TriggerClick
ObjectTemplate.addTemplate S_medikit_SwitchFireRate
ObjectTemplate.addTemplate S_medikit_Reload1P
ObjectTemplate.addTemplate S_medikit_Reload3P
ObjectTemplate.addTemplate S_medikit_Deploy1P
ObjectTemplate.addTemplate S_medikit_Deploy3P
ObjectTemplate.addTemplate S_medikit_Zoom
rem -------------------------------------
ObjectTemplate.animationSystem1P Objects/Weapons/Handheld/medikit/AnimationSystem1p.inc
ObjectTemplate.animationSystem3P Objects/Weapons/Handheld/medikit/AnimationSystem3p.inc
ObjectTemplate.projectileTemplate HealProjectile
ObjectTemplate.velocity 10
ObjectTemplate.itemIndex 4
ObjectTemplate.delayToUse 2.5
ObjectTemplate.create GenericProjectile HealProjectile
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.createNotInGrid 1
rem ObjectTemplate.setGeometry medikit_dressing
rem ---BeginComp:StickyCollisionComp ---
ObjectTemplate.createComponent StickyCollisionComp
ObjectTemplate.collision.bouncing 1
ObjectTemplate.collision.maxStickAngle 360
ObjectTemplate.collision.stickToVehicles 0
rem ---EndComp ---
rem ---BeginComp:ReplenishDetonationComp ---
ObjectTemplate.createComponent ReplenishDetonationComp
ObjectTemplate.detonation.triggerRadius 0.25
ObjectTemplate.detonation.triggerType MTYPco
ObjectTemplate.detonation.replenishingType RTHeal
ObjectTemplate.detonation.replenishingStrength 5
rem ---EndComp ---
rem ---BeginComp :D efaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp :D efaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 0
rem ---EndComp ---
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Point
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 73
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/1/0/0
ObjectTemplate.material 73
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.armingDelay 0
ObjectTemplate.mass 10
ObjectTemplate.gravitymodifier 10
ObjectTemplate.localPredictOnClient 1
ObjectTemplate.damage 0
ObjectTemplate.soundFilename "common/sound/Heal_loop.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.stopType 1
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.halfVolumeDistance 3
ObjectTemplate.activeSafe Sound S_medikit_Fire1P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "common/sound/Heal_loop.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.stopType 2
ObjectTemplate.is3dSound 0
ObjectTemplate.volume 0.53
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_medikit_Fire1P_Outdoor
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_Fire3P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "common/sound/Heal_loop.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.stopType 2
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 0.2
ObjectTemplate.reverbLevel 1
ObjectTemplate.minDistance 1
ObjectTemplate.halfVolumeDistance 3
ObjectTemplate.activeSafe Sound S_medikit_BoltClick
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_TriggerClick
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_SwitchFireRate
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_Reload1P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_medikit_Reload3P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.minDistance 0.5
ObjectTemplate.halfVolumeDistance 2
ObjectTemplate.activeSafe Sound S_medikit_Deploy1P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 0
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_medikit_Deploy3P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 0
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.minDistance 0.5
ObjectTemplate.halfVolumeDistance 2
ObjectTemplate.activeSafe Sound S_medikit_Zoom
ObjectTemplate.modifiedByUser nfe
I also tried to do the same for the wrench but to no success. I just used same code and replaced material of the projectile to 84 (engineer ability material) and the trigger to MTYVehicle. Any idea why its no repairing vehicles?