Help: Weapon odfs

Started by Are§, January 31, 2013, 03:12:00 PM

Previous topic - Next topic
Hey, today I am trying to make a rifle that shoots its one shot only when you charge it up, not before though. So far i have been able to apply the charge to it, but I'm not sure how to make it so that it won't let you shoot until it is fully charged. Can anyone help me with this?

I think if you look at the Wookiee bowcaster it mentions how many shots to fire when it's at a certain charge level (like 0.50, 0.75, if I remember right).  Maybe if you copy those and change the shots to 0 then it won't fire.
Also, maybe just putting one at 0.00 and then making the shot count 0 will do it.
Sorry I don't have the exact code with me now...
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

ok thanks, that's what i was gonna try next

set the next charge for how many milliseconds you want the charge delay to be. id look at the mortar odfs to get a good idea of how its structured.

January 31, 2013, 06:37:20 PM #4 Last Edit: January 31, 2013, 07:37:19 PM by Are§
So this is what i have in the odf now and it still is not working (i have tried various combinations)

[WeaponClass]
ClassLabel = "cannon"

[Properties]
AnimationBank = "rifle"
GeometryName = "wunderwaffe"
HighResGeometry         = "wunderwaffe"

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

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

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

MinRange = "0"
OptimalRange = "16"
MaxRange = "48"

LockOnRange             = "64.0"
LockTime = "0.4"
lockOnAngle = "1.0"

ZoomMin = "2.5"
ZoomMax = "2.5"
ZoomRate = "0.0"

YawSpread = "0.0"
PitchSpread = "0.0"

SpreadPerShot = "1.1"
SpreadRecoverRate = "4.8"
SpreadThreshold = "1.6"
SpreadLimit = "6.0"

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

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

//RoundsPerClip = "10"
ReloadTime = "1.5"
ShotDelay = "1.0"
TriggerSingle = "0"
MaxPressedTime = "2.25"

SalvoCount = "1"
ShotsPerSalvo = "0"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

OrdnanceName = "imp_weap_inf_rifl4_ord"
FirePointName = "hp_fire"

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

IconTexture = "IMP_blasterrifle_icon"
ReticuleTexture = "reticule_rifle"
ModeTexture = "HUD_weap_charge"

ChargeUpEffect = "chargeup"
MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashLightColor = "255 220 220 175"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"

RecoilLengthLight       = "0.1"
RecoilLengthHeavy       = "0.1"
RecoilStrengthLight     = "1.0"
RecoilStrengthHeavy     = "0.2"
RecoilDecayLight = "0.0"
RecoilDecayHeavy = "0.0"

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

FireSound        = "imp_weap_inf_rifle_fire"
ReloadSound      = "imp_weap_inf_reload_med"
ChangeModeSound = "imp_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "imp_weap_inf_equip_med"
ClankLeftWalkSound  = ""
ClankRightWalkSound = ""
ClankLeftRunSound   = ""
ClankRightRunSound  = ""
JumpSound           = "imp_weap_inf_rifle_mvt_jump"
LandSound           = "imp_weap_inf_rifle_mvt_land"
RollSound           = "imp_weap_inf_rifle_mvt_roll"
ProneSound          = "imp_weap_inf_rifle_mvt_squat"
SquatSound          = "imp_weap_inf_rifle_mvt_lie"
StandSound          = "imp_weap_inf_rifle_mvt_getup"

ChargeRateLight          = "1.0"
MaxChargeStrengthLight  = "1.0"
ChargeDelayLight        = "0.0"
ChargeRateHeavy          = "1.0"
MaxChargeStrengthHeavy  = "0.5"
ChargeDelayHeavy        = "2.2"

NextCharge = "0.00"

OrdnanceName = "imp_weap_inf_rifl4_ord"

NextCharge = "2.20"

ShotsPerSalvo = 1

OrdnanceName = "imp_weap_inf_rifl4_ord"


any clue on what i could be doing wrong? Right now the charge works and everything, but i dont think it is recognizing the second salvo, because it won't shoot anything while it's fully charge. My guess is that it is still referring to the first salvo, which doesn't have a shot. Note: when i put the stuff at the bottom in the weapon performance area, the reticule wouldnt show up for some reason and it still didnt fire anything.

"NextCharge = 2.20"
Maybe refresh my memory, but shouldn't it only go to 1.0?  I forgot to check my bowcaster again...
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

I set max charge time to 2.25 though

But anyways this issue is resolved as i came across another method of making the desired weapons, but thanks for the help  8)

Quote from: Are§ on February 01, 2013, 07:46:04 AM
I set max charge time to 2.25 though
I think, a charge rate number, it's not a time, it's a percent. So, 2.25, means 225%  :D.
To solve tnis, all you have to do, it's change rate to correct number, and put the number of shots.

For example:

ShotsPerSalvo         = "0"

And for charge rate:

NextCharge         = 0.99
HeatPerShot         = "1.0"
ShotsPerSalvo         = "1"
Beauty is, the way to perfection.

Glory to Ukraine!  :mf: