Page 1 of 1

Multi-shot grenade [Solved]

Posted: Mon Jul 15, 2013 5:06 pm
by Dreadnot9
I'm using the following odfs in an attempt to get a weapon which "throws" 3 grenades simultaneously, it doesn't appear be working.
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "grenade"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
HighResGeometry = "com_weap_inf_thermaldetonator"
HUDTag = "cis_weap_inf_thermaldetonator"

OrdnanceName = "com_weap_inf_cherrybombs_ord"

OffhandWeapon = 1

//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "1"
TargetBuilding = "1"

MinRange = "8"
OptimalRange = "16"
MaxRange = "24"

LockOnRange = "30.0"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "1"
ReloadTime = "0.0"
ShotDelay = "1.3"
ShotElevate = "0.18"
TriggerSingle = "1"
//MaxPressedTime = "0.0"

SalvoCount = "1"

ShotsPerSalvo = "3"
ShotPatternCount = "3"
ShotPatternPitchYaw = "-0.1 -0.8"
ShotPatternPitchYaw = "0.8 0.0"
ShotPatternPitchYaw = "-0.1 0.8"

SalvoDelay = "0.0"
InitialSalvoDelay = "0.51"
SalvoTime = "0.0"

//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************

ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.0"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.25"
ChargeDelayHeavy = "1.45"

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "0"
RecoilStrengthHeavy = "0"


//************************************************
//******************* SOUND *****************
//************************************************

FireSound = "com_weap_throw"
FireEmptySound = "com_weap_inf_ammo_empty"
Ordnance
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
ExplosionExpire = "com_weap_inf_cherrybombs_exp"

LightColor = "252 67 67 150"
LightRadius = "2.0"

ImpactEffectWater = "com_sfx_watersplash_sm"
ImpactEffect = "com_sfx_explosion_lg"
TrailEffect = "com_sfx_weap_grenade_red"

LifeSpan = "0.8"
Velocity = "25.0"
Gravity = "1.25"
Rebound = "0.2"
Friction = "2.0"

StickPerson = 1
StickAnimal = 1
StickDroid = 1
StickVehicle = 1
StickBuilding = 1
StickBuildingDead = 0
StickBuildingUnbuilt= 0
StickTerrain = 1

CollisionOtherSound = "com_weap_inf_grenade_bounce"
CollisionWaterSound = "imp_inf_trooper_land_water"
CollisionFoliageSound = ""
Explosion
Hidden/Spoiler:
[ExplosionClass]
ClassLabel = "explosion"

[Properties]
Damage = "100.0"
DamageRadiusInner = "4.0"
DamageRadiusOuter = "6.0"

Push = "5.0"
PushRadiusInner = "2.0"
PushRadiusOuter = "4.0"

PushDeadOnly = 0

Shake = "0.5"
ShakeLength = "0.75"
ShakeRadiusInner = "8.0"
ShakeRadiusOuter = "15.0"

Effect = "com_grenade_thermal_e_exp" //com_grenade_thermal, com_grenade_thermal_exp, com_grenade_thermal_v_exp
WaterEffect = "com_sfx_watersplash_lg"
Decal = "decal_explosion"
LightColor = "255 220 100 255"
LightRadius = "7.0"
LightDuration = "1.0"

VehicleScale = "1.0"
PersonScale = "1.0"
DroidScale = "1.0"
BuildingScale = "1.0"
AnimalScale = "1.0"

SoundProperty = "com_weap_thermaldetonator_exp"
//WaterExplosion = "com_weap_obj_med_water_exp"
My guess would be that the offset functions (for the each grenade) from the wrist tri-shot aren't compatible with a "grenade" class label, but I wasn't able to get it working using a "cannon" label either.
Any help is appreciated.

Re: Multi-shot grenade

Posted: Mon Jul 15, 2013 5:17 pm
by Maveritchell
When in doubt, use a "cannon" class weapon. That's the weapontype with the most feature support, and in this specific case, it's the weapontype that supports what you're looking for.

Re: Multi-shot grenade

Posted: Mon Jul 15, 2013 7:33 pm
by Dreadnot9
Thank you, I'll test it out, I had tried that, but I probably got something wrong...

Re: Multi-shot grenade

Posted: Mon Jul 15, 2013 9:56 pm
by Marth8880
Take the Tri-Shot ODF, change its ordnance to a grenade ODF, and give the weapon ODF a looooot of spread (so the shot pattern won't look the same each time upon firing.)

Re: Multi-shot grenade

Posted: Tue Jul 16, 2013 12:25 am
by Dreadnot9
Well, this is what i've got, and it almost works, but it only seems to fire 1 grenade instead of 3.
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
HighResGeometry = "com_weap_inf_thermaldetonator"
HUDTag = "cis_weap_inf_thermaldetonator"

OrdnanceName = "com_weap_inf_cherrybombs_ord"

OffhandWeapon = 1

//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

MinRange = "0"
OptimalRange = "0"
MaxRange = "0"

LockOnRange = "24.0"
LockTime = "0.4"
LockOnAngle = "1.0"

ZoomMin = "2.0"
ZoomMax = "2.0"
ZoomRate = "0.0"

YawSpread = "0.0"
PitchSpread = "0.0"

SpreadRecover = "5.0"

KickStrength = "0.0"

SpreadPerShot = "5.0"
SpreadRecoverRate = "0.0"
SpreadThreshold = "1.6"
SpreadLimit = "6.0"

StandStillSpread = "0.0"
StandMoveSpread = "0.0"
CrouchStillSpread = "0.0"
CrouchMoveSpread = "0.0"
ProneStillSpread = "0.0"
ProneMoveSpread = "0.0"

HeatPerShot = "0.0"
HeatRecoverRate = "0.4"
HeatThreshold = "0.25"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "1"
ReloadTime = "0.0"
ShotDelay = "1.3"
TriggerSingle = "1"
ShotElevate = "0.18"
MaxPressedTime = "0.0"

SalvoDelay = "0.0"
InitialSalvoDelay = "0.51"
SalvoTime = "0.0"

SalvoCount = "1"

ShotsPerSalvo = "3"
ShotPatternCount = "3"
ShotPatternPitchYaw = "-0.2 -0.9"
ShotPatternPitchYaw = "0.9 0.0"
ShotPatternPitchYaw = "-0.2 0.9"

//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************

ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.0"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.25"
ChargeDelayHeavy = "1.45"

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "0"
RecoilStrengthHeavy = "0"


//************************************************
//******************* SOUND *****************
//************************************************

FireSound = "com_weap_throw"
FireEmptySound = "com_weap_inf_ammo_empty"
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
ExplosionExpire = "com_weap_inf_cherrybombs_exp"

LightColor = "252 67 67 150"
LightRadius = "2.0"

ImpactEffectWater = "com_sfx_watersplash_sm"
ImpactEffect = "com_sfx_explosion_lg"
TrailEffect = "com_sfx_weap_grenade_red"

LifeSpan = "0.8"
Velocity = "25.0"
Gravity = "1.25"
Rebound = "0.2"
Friction = "2.0"

StickPerson = 1
StickAnimal = 1
StickDroid = 1
StickVehicle = 1
StickBuilding = 1
StickBuildingDead = 0
StickBuildingUnbuilt= 0
StickTerrain = 1

CollisionOtherSound = "com_weap_inf_grenade_bounce"
CollisionWaterSound = "imp_inf_trooper_land_water"
CollisionFoliageSound = ""

Re: Multi-shot grenade

Posted: Tue Jul 16, 2013 1:25 am
by Marth8880
Make sure that whichever unit it using the weapon has enough ammo allocated for that many shots in the unit's ODF.

Re: Multi-shot grenade

Posted: Tue Jul 16, 2013 3:42 am
by THEWULFMAN

Code: Select all

RoundsPerClip = "1"
There's your problem. Increase it to 3.

Re: Multi-shot grenade

Posted: Tue Jul 16, 2013 10:48 am
by Marth8880
Yes, that^, and also allocate the weapon's WeaponAmmo parameter in your unit's ODF to a multiple of 3.

Re: Multi-shot grenade

Posted: Wed Jul 17, 2013 4:56 pm
by CressAlbane
Actually doesn't that parameter just give the number of clips?

Re: Multi-shot grenade

Posted: Wed Jul 17, 2013 5:11 pm
by THEWULFMAN
CressAlbane wrote:Actually doesn't that parameter just give the number of clips?
Which one? WeaponAmmo or RoundsPerClip? The former does go with number of clips, Marth is not being very five right now. Latter is how much ammo per clip. Right now there's only one grenade for it to fire.

But yeah, RoundsPerClip, set that to 3. Should solve your problem.

Re: Multi-shot grenade

Posted: Wed Jul 17, 2013 7:30 pm
by Dreadnot9
It indeed did and the grenade(s) is working! thanks for the help.