Page 1 of 1

Problem with double-bladed weapons

Posted: Sat Sep 10, 2011 1:15 pm
by willinator
For my current map, I am trying to give the electrostaff to the Militia Elite. I can load the Magnaguard with the staff no problem, but if I give the weapon to the Elite I get a CTD with the following error

Code: Select all

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\SoldierAnimatorClass.cpp(1881)
Can't find soldier animation human_sabre_stand_attack2c(_upper)
I switched out the electrostaff for the Glaive, and the same thing happens. I am at a loss as to what is going on. Please help!

Electrostaff ODF
Hidden/Spoiler:
[WeaponClass]

ClassLabel = "melee"
ClassParent = "com_weap_inf_electrostaff"

[Properties]

GeometryName = "cis_weap_magnastaff"
ComboAnimationBank = "human_sabre melee cis_inf_grievousguard"

HUDTag = "hud_magnastaff"

NumDamageEdges = "2"
FirePointName = "hp_fire1"
LightSaberLength = "0.3"
LightSaberWidth = "0.2"
LightSaberTexture = "violetlightsaber"
LightSaberTrailColor = "179 4 157 128"

FirePointName = "hp_fire2"
LightSaberLength = "0.3"
LightSaberWidth = "0.2"
LightSaberTexture = "violetlightsaber"
LightSaberTrailColor = "179 4 157 128"

AttachDynamic = "1"

AttachEffect = "electrostaff_electro"
AttachToHardPoint = "hp_fire1"
AttachEffect = "electrostaff_electro"
AttachToHardPoint = "hp_fire2"
Glaive ODF
Hidden/Spoiler:
[WeaponClass]

ClassLabel = "melee"
ClassParent = "com_weap_inf_lightsaber"

[Properties]

GeometryName = "weap_inf_glaive"
ComboAnimationBank = "human_sabre melee cis_hero_darthmaul"

NumDamageEdges = "2"
FirePointName = "hp_fire1"
LightSaberLength = "0.0"
LightSaberWidth = "0.0"
LightSaberTexture = "clear"
LightSaberTrailColor = "clear"

FirePointName = "hp_fire2"
LightSaberLength = "0.0"
LightSaberWidth = "0.0"
LightSaberTexture = "clear"
LightSaberTrailColor = "clear"

HitSound = "com_weap_inf_grenade_bounce"
DeflectEffect = "com_sfx_sabredeflect"
DeflectSound = "com_weap_inf_grenade_bounce"
OnSound = "nosound"
TurnOnSound = "nosound"
TurnOffSound = "nosound"
Unit ODF (with Glaive)
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "all_inf_default"


[Properties]
PointsToUnlock = 20

UnitType = "support"


MaxSpeed = 6.0 // base forward speed
MaxStrafeSpeed = 4.5 // base right/left speed

ScanningRange = 30.0
TransmitRange = 300.0

WEAPONSECTION = 1
WeaponName = "rep_weap_inf_z6"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "all_weap_inf_glaive"
WeaponAmmo = 0

VOUnitType = 121
2nd Unit ODF
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "all_inf_default_elite"

[Properties]
GeometryName = "all_inf_militiaelite"
GeometryLowRes = "all_inf_militiaelite"
FirstPerson = "REP\repcomm;rep_1st_trooper"

Re: Problem with double-bladed weapons

Posted: Sat Sep 10, 2011 1:21 pm
by Noobasaurus
I believe the reason you get that is because the normal unit (when given a double bladed something) does not have the animations to support it. Add a line in the unit odf that looks like this:

Code: Select all

AnimationName 		= "maul"
Or whatever animation you are using. Keep in mind you'll have to copy them over to your munged folder in that side.

Re: Problem with double-bladed weapons

Posted: Sat Sep 10, 2011 1:33 pm
by DarthD.U.C.K.
exactly, you always have to use the combofile (which defines the attacks etc.) in combination with its animationset(which contains the needed animations) or make a custom animationset/combofile.

Re: Problem with double-bladed weapons

Posted: Sat Sep 10, 2011 1:51 pm
by willinator
Silly me, doing everything EXCEPT the most important part :oops: . Thanks for making it work.