Chargeable Weapon Help[Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Chargeable Weapon Help[Solved]

Post by yuke5 »

I'm trying to make a sniper rifle which only fires once it has been charged all the way. However, when it is charged all the way, it fires nothing. Is it impossible to make a weapon that doesn't have a base ordnance and can only be charged?

My ODF:
Hidden/Spoiler:
[WeaponClass]
GeometryName = "all_weap_inf_sniperrifle.msh"

[Properties]

GeometryName = "all_weap_inf_sniperrifle"
HighResGeometry = "all_1st_weap_inf_sniperrifle"

OrdnanceName = "
FirePointName = "hp_fire"

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

FireSound = "all_weap_inf_sniper_rifle_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"


[WeaponClass]
ClassLabel = "cannon"

[Properties]

AnimationBank = "rifle"

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

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

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

MinRange = "8"
OptimalRange = "64"
MaxRange = "128"
AIUseBubbleCircle = "1"
AIBubbleSizeMultiplier = "0.6"

LockOnRange = "0.0"
LockTime = "0.0"
LockOnAngle = "1.0"

ReticuleInAimingOnly = 0
SniperScope = 1
ZoomFirstPerson = 1
ZoomMin = "2.0"
ZoomMax = "8.0"
ZoomRate = "0.0"

YawSpread = "0.0"
PitchSpread = "0.0"

KickStrength = "2.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"

//***********************************************
//*********** CHARGING CRAP ********************
//***********************************************

ChargeUpEffect = "com_sfx_chargeup"

ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.5"
ChargeDelayHeavy = "0.75"
MaxPressedTime = "3.0"
//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "1" // 5
ReloadTime = "1.5"
ShotDelay = "0.8" //1.0
TriggerSingle = "1"



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


ScopeTexture = "weapon_scope3"

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

//***********************************************
//*********** MORE CHARGIN CRAP ***************
//***********************************************

NextCharge = 1.0
SalvoCount = "1"
SalvoDelay = "0.0"
OrdnanceName = "all_weap_inf_falaan_ord"/Hide]

It's Ordinance's ODF:

[Hide][OrdnanceClass]
ClassParent = "com_weap_inf_sniper_rifle_ord"

[Properties]
LaserTexture = "com_sfx_laser_blue"
LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 100"
LightRadius = "4.0"
Last edited by yuke5 on Wed Apr 11, 2012 12:47 pm, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Chargeable Weapon Help

Post by AQT »

You should look at the stock Wookiee bowcaster ODF for reference. It has various charge levels with what ordnance to fire depending on what percentage of the MaxPressTime you hold it for. You don't even have any of this in your main ODF. Also, if you want your weapon to fire nothing when it is uncharged, you simply leave its OrdnanceName blank.
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: Chargeable Weapon Help

Post by CressAlbane »

Wait- is it legal to have 2 [WeaponClass] groups? Try merging them. Oh, and instead of nextCharge at 1.0 (which can never be reached, it goes to .99999999...), try .98 or something.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Chargeable Weapon Help

Post by yuke5 »

Okay, got it. Thanks!
Post Reply