Dual Phase Lightsaber [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
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Dual Phase Lightsaber [Solved]

Post by jedimoose32 »

Hi everyone.

I'm trying to do a dual phase lightsaber (for the uninitiated, THIS... tl;dr: lightsaber that can switch between blades of two lengths).
However, the unit can't switch between his two primary weapons (which are supposed to be the two lengths/colours of the blade). Is there any way around this? It was suggested in THIS thread that it can be done fairly simply (though with no detail regarding how).

Here is the unit odf:
Hidden/Spoiler:
[code]
[GameObjectClass]
ClassParent = "com_jedi_default"
GeometryName = "rep_inf_ep3obiwan.msh"

[Properties]
AISizeType = "HOVER"

GeometryName = "rep_inf_ep3obiwan"
GeometryLowRes = "rep_inf_ep3obiwan_low1"
AnimationName = "obiwan"

JetJump = "10.0" //The initial jump-push given when enabling the jet
JetPush = "0.0" //The constant push given while the jet is enabled (20 is gravity)
JetAcceleration = "10.0" // for characters with jet jump, use this acceleration for in air control
JetEffect = ""
JetFuelRechargeRate = "0.0" //Additional fuel per second (fuel is 0 to 1)
JetFuelCost = "0.0" //Cost per second when hovering (only used for jet-hovers)(fuel is 0 to 1)
JetFuelInitialCost = "0.0" //4initial cost when jet jumping(fuel is 0 to 1)
JetFuelMinBorder = "0.0" //minimum fuel to perform a jet jump(fuel is 0 to 1)
JetShowHud = 0
JetEnergyDrain = 40.0

CollisionScale = "0.0 0.0 0.0" // don't take damage from collisions


WEAPONSECTION = 1
WeaponName = "new_weap_hornsaber_a"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "new_weap_hornsaber_b"
WeaponAmmo = 0

//WEAPONSECTION = 3
//WeaponName = "com_weap_inf_force_push"
//WeaponAmmo = 0
//WeaponChannel = 1

//WEAPONSECTION = 4
//WeaponName = "com_weap_inf_force_pull"
//WeaponAmmo = 0
//WeaponChannel = 1

//SOUND
SndHeroSelectable = ""
SndHeroSpawned = "hero_obiWan_spawn"
SndHeroDefeated = "hero_obiWan_exhausted"
SndHeroKiller = "hero_obiWan_exhausted"

VOSound = "rep_off_response_hero_command SC_Follow"
VOSound = "rep_off_response_hero_command SC_StopFollow"
VOSound = "rep_off_response_hero_command SC_VehicleWaitUp"
VOSound = "rep_off_response_hero_command SC_GetIn"
VOSound = "rep_off_response_hero_command SC_GetOut"

VOSound = "hero_obiWan_AcquiredTarget AcquiredTarget"
VOSound = "hero_obiWan_KillingSpree4 KillingSpree4"

VOUnitType = 190
SoldierMusic = "rep_hero_ObiWan_lp"
HurtSound = ""
DeathSound = ""
AcquiredTargetSound = ""
HidingSound = ""
//ApproachingTargetSound = ""
FleeSound = ""
PreparingForDamageSound = ""
HeardEnemySound = ""
ShockFadeOutTime = ""
ShockFadeInTime = ""
ShockFadeOutGain = ""
ShockSound = ""
ClothingRustleSound = ""
//LowHealthSound = "com_inf_saber_ambient"
LowHealthThreshold = "1.1"
FoleyFXClass = "rep_inf_soldier"
[/code]
The two lightsaber odfs:
Hidden/Spoiler:
[code]
[WeaponClass]

ClassLabel = "melee"
ClassParent = "com_weap_inf_lightsaber"

[Properties]

GeometryName = "rep_weap_inf_lightsabre"
ComboAnimationBank = "human_sabre melee new_hero_horn1"

FirePointName = "hp_fire"
LightSaberLength = "0.85"
LightSaberWidth = "0.1"
LightSaberTexture = "silverlightsabre"
LightSaberTrailColor = "160 160 180 128"
[/code]
Hidden/Spoiler:
[code]
[WeaponClass]

ClassLabel = "melee"
ClassParent = "com_weap_inf_lightsaber"

[Properties]

GeometryName = "rep_weap_inf_lightsabre"
ComboAnimationBank = "human_sabre melee new_hero_horn2"

FirePointName = "hp_fire"
LightSaberLength = "1.25"
LightSaberWidth = "0.06"
LightSaberTexture = "violetlightsabre"
LightSaberTrailColor = "220 45 255 128"
[/code]
The combo files are just the stock Obi-Wan files. I tried making them separate to see if the problem was caused by having two weapons on the same unit share a single combo.
By the way I've had no trouble using his secondaries, and I can switch between them just fine. I read HERE that I can have either two melee weapons and no secondaries, or one melee weapon and secondaries, so I've disabled them.

Any idea what my issue is here?
Last edited by jedimoose32 on Sun Jan 18, 2015 6:10 pm, edited 1 time in total.
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: Dual Phase Lightsaber

Post by Bob »

Remember that weapon switching is disabled if the first weapon slot is a melee weapon. Give that guy a pistol or stuffs as main and it should work.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Dual Phase Lightsaber

Post by jedimoose32 »

Ah, okay. Thank you.
Post Reply