Random Crashes caused by Custom Melee Unit?

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
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Random Crashes caused by Custom Melee Unit?

Post by AQT »

My map randomly crashes when I play as my custom melee unit. The only Severity 3 errors I get from the log are:
Hidden/Spoiler:
Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range

Message Severity: 3
.\Util\RedSceneObject.cpp(93)
RedSceneObject: SetRenderRadius(1.#J) out of range
Could the problem be with the combo? Any help would be appreciated.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Random Crashes caused by Custom Melee Unit?

Post by Fiodis »

You didn't edit any MSH's? At all?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random Crashes caused by Custom Melee Unit?

Post by AQT »

No, but I did scale the weapon that it uses.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Random Crashes caused by Custom Melee Unit?

Post by Teancum »

How random is it? Is it within the first ~20 seconds of the game usually?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random Crashes caused by Custom Melee Unit?

Post by AQT »

It usually crashes when I block and attack consecutively and quickly (button smashing). I did munge a new animation set using the human_sabre basepose, sidious' three saber swings, and vader's dash attack. Could this be a problem?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Random Crashes caused by Custom Melee Unit?

Post by Fiodis »

Try de-scaling the weapon. See if that works. If it does, apparently scaling the weapon messes it up and you'd need to model a new one. The Render thing makes me think it's the msh....
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random Crashes caused by Custom Melee Unit?

Post by AQT »

That didn't seem to work.

I decided to fix up the lua to have 16 of the melee units against 16 Han Solos. The game crashed about 20 to 30 seconds into playing the map. The error log came up with the same errors as posted above along with some memory pool errors. I raised the pools and munged. The map still crashed the same way with the same errors (minus the memory pool errors).

I originally had two Obi Wans, Jangos, Bobas, Chewies, and two of my melee units before I had increased the unit count in the lua and it took a lot longer for the crash to occur. So is my animation set flawed or is it something else? :?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Random Crashes caused by Custom Melee Unit?

Post by Maveritchell »

You can:
Post a picture of your animation's folder (in SoldierAnimationBank),
Post your .combo

OR

Remove things one at a time - first the model, then the combo/animations, etc. until you find the problem.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random Crashes caused by Custom Melee Unit?

Post by AQT »

First option:
Hidden/Spoiler:
Image
basepose
dark_sabre_stand_dashattack_full
dark_sabre_stand_dashattackend_full
dark_sabre_stand_gam_guard_full
dark_sabre_stand_idle_emote_full
dark_sabre_stand_obiwan1b_end_full
dark_sabre_stand_obiwan1b_full
dark_sabre_stand_vaderdash
The combo:
Hidden/Spoiler:
OffhandAnimation("stand_useforce", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("stand_useforce", "CHARGE");

State("IDLE")
{
Duration(0.0); // infinite duration
EnergyRestoreRate(); // (0.0, "FromSoldier")
InputLock(0.15, "Sprint", "Jump", "Crouch");

TurnOffLightsaber();

Transition("DEFLECT")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Energy(">=", 2.5); // at least half a second worth of deflect time
Button("FireSecondary", "Press");
}
}
Transition("BACK_ATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
Thrust(">", 0.25);
ThrustAngle(135, 225);
}
}
Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
}
}
Transition("DASHATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Sprint");
Button("Fire", "Press");
}
}
Transition("JUMPATTACK_FALL")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Jump");
//The following should be true during a jetjump, jump, or fall
// unless we're more than 0.35 seconds from the apex
//NOTE: This may not allow luke to jump attack during longer falls
// or falling from a force jump when it could.
VelocityY(">", -6.3);
TimeInPosture(">", 0.25);
Button("Fire", "Press");
}
}
}

State("DEFLECT")
{
Posture("Stand");
Sound("imp_weap_lightsabre_block");

//TurnoffLightsaber();

Animation("stand_block_idle")
{
Loop();
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
LowResPose(0, "Frames");
}

Duration(0.0); // infinite duration, looping anim

InputLock(0.0, "All", "!Thrust"); // lock all but move controller for duration of state
EnergyRestoreRate(-10.0); // drain energy while ready to deflect
Deflect()
{
DeflectAngle(-110, 110); // deflect anything from forward arc
EnergyCost(0.0);

DeflectAnimation("stand_block_front1", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_front2", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left1", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left2", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right1", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right2", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
}

Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Fire", "Press");
}
}
Transition("DEFLECT_ROLL") // same as the code checking for rolling
{
EnergyCost(25.0);
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
Thrust(">", 0.9);
ThrustAngle(-120, 120);
}
}
Transition("DEFLECT_CROUCH")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
}
}
Transition("DEFLECT_JUMP")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Jump", "Press");
}
}
Transition("DEFLECT_SPRINT")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Sprint", "Down");
}
}
Transition("IDLE")
{
If()
{
Break();
Energy("<=", 0.0); // if no energy left
}
Or()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Sprint");
}
Or()
{
Break(20, "Frames"); // all transitions are breaking if Duration is 0
Button("FireSecondary", "Press");
}
Or()
{
Break(); // all transitions are breaking if Duration is 0
Button("Reload", "Press");
}
}
}

State("DEFLECT_JUMP")
{
Posture("Jump");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_CROUCH")
{
Posture("Crouch");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_ROLL")
{
Posture("Roll");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_SPRINT")
{
Posture("Sprint");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DASHATTACK")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
}
Sound("com_weap_throw");

AnimatedMove()
{
VelocityZ(17.0);
VelocityX(0.0);
VelocityFromThrust(0.5);
VelocityFromStrafe(0.5);
// Until()
// {
// Break(16, "Frames");
// }

}
TurnFactor(0.3);

Duration(10, "Frames");

InputLock("All", "!Thrust");

Attack()
{
DamageTime(4, 10, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(800);
Push(14.0);
}

Transition("DASHATTACK2");
}

State("DASHATTACK2")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
BlendTimeTo("stand_attack1c", 0.4);
}

Duration(30, "Frames");

AnimatedMove()
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(0.5);
VelocityFromStrafe(0.5);
}
TurnFactor(0.3);

InputLock("All", "!Thrust");

Transition("DASHATTACK_RECOVER");
}

State("DASHATTACK_RECOVER")
{
Posture("Stand");
Animation("stand_dashattackend")
{
BlendInTime(0.10);
BlendOutTime(0.25);
}

AlignedToThrust();

TurnFactor(0.3);

InputLock("All", "!Thrust", "!Fire");

Transition("IDLE");
}

State("BACK_ATTACK")
{
Posture("Stand");
Animation("stand_attack_backwards")
{
BlendInTime(0.15);
BlendOutTime(0.15);
}

Sound("com_weap_throw", 4, "Frames");

Duration(35, "Frames");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(6, 10, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(6.0);
}

Attack()
{
DamageTime(17, 22, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(6.0);
}

Transition("IDLE");
}

//Forward declare animations to allow BlendTimeTo references:
Animation("stand_vaderdash");
Animation("stand_obiwan1b");
Animation("stand_obiwan1b_end");
Animation("stand_gam_guard");

// Vader's dash attack - NOT _full
State("ATTACK1")
{
Posture("Stand");
Animation("stand_vaderdash")
{
//SyncType("sidious1");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_obiwan1b", 0.15);
}

Sound("com_weap_throw");

AlignedToThrust();

Attack()
{
DamageTime(2, 7, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(300);
Push(5.0);
}

Transition("ATTACK2")
{
If()
{
Break(13, "Frames");
TimeStart(5, "Frames");
TimeEnd(20, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("IDLE");
}

// Obiwan final attack - _full
State("ATTACK2")
{
Posture("Stand");
Animation("stand_obiwan1b")
{
//SyncType("sidious1");
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
BlendTimeTo("stand_obiwan1b_end", 0.0);
}
Sound("com_weap_throw");

//set a duration
AlignedToThrust();

// StrafeFactor(0.5);
// TurnFactor(0.5);

Attack()
{
DamageTime(-3, 7, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(5.0);
}

Transition("RECOVER2_ATTACK")
{
If()
{
Break(16, "Frames");
TimeStart(6, "Frames");
TimeEnd(16, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}

Transition("RECOVER2");
}

State("RECOVER2")
{
Posture("Stand");
Animation("stand_obiwan1b_end")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
}

AlignedToThrust();

Transition("IDLE");
}

State("RECOVER2_ATTACK")
{
Posture("Stand");
Animation("stand_obiwan1b_end")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
}

AlignedToThrust();

Duration(7, "Frames");

Transition("ATTACK3");
}

State("ATTACK3")
{
Posture("Stand");
Animation("stand_gam_guard")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.3);
}
Sound("com_weap_throw", 6, "Frames");

//set a duration
//Duration(30, "Frames");
AnimatedMove() // animation controls velocity for entire state
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(6.0);
VelocityFromStrafe(2.0);
}
AlignedToThrust();

TurnFactor(0.5);

Duration(45, "Frames");

InputLock("All", "!Thrust"); // lock all controls for duration of state
Attack()
{
DamageTime(14, 24, "Frames");
DamageLength(1.5);
DamageWidth(1.25);
Damage(600);
Push(10.0);
}

Transition("IDLE");
}

// forward declare jumpattack_land, since jumpattack_fall refers to it:
Animation("jumpattack_land");

State("JUMPATTACK_FALL")
{
Posture("Jump");

TurnoffLightsaber();

Animation("jumpattack_fall")
{
Loop("FinalFrame");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
// BlendTimeTo("jumpattack_land", 0.15);
}

Sound("com_weap_throw");

Duration(0);


EnergyRestoreRate(0.0);

Gravity(4.0);
GravityVelocityTarget(-20.0); // accelerate us
AnimatedMove();
InputLock("All", "!Thrust"); // lock all buttons for duration of state

Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
}
}
Transition("IDLE")
{
If()
{
Break();
Posture("Any", "!Stand", "!Jump", "!Jet");
}
}
}

State("JUMPATTACK_LAND")
{
Posture("Stand");

TurnoffLightsaber();

Animation("jumpattack_land")
{
AimType("FullBody");
//SyncType("jumpattack_land", "ByTime");
BlendInTime(0.00);
BlendOutTime(0.20);
}

RestartAnimation();
Duration(4, "Frames");

EnergyRestoreRate(0.0);

AnimatedMove();
InputLock("All");

Transition("JUMPATTACK_LAND2");
}

State("JUMPATTACK_LAND2")
{
Posture("Stand");

TurnoffLightsaber();

Animation("jumpattack_land")
{
AimType("FullBody");
//SyncType("jumpattack_land", "ByTime");
BlendInTime(0.00);
BlendOutTime(0.20);
}

EnergyRestoreRate(0.0);

PlayExplosion(); // yep...

AnimatedMove();
InputLock("All");
}
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: Random Crashes caused by Custom Melee Unit?

Post by MetalcoreRancor »

Check and see if you, or an ai has died with a specific character in any fashion, to trigger the crash.

Check if said characters were eating by a rancor/fell into a death pit.

Check each and every combo attack you do, and watch for animation glitchs/glitchyness.

Get back to me when you've done those 3 things.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Random Crashes caused by Custom Melee Unit?

Post by Maveritchell »

You need to move your Dashattack state (all three states, DASHATTACK, DASHATTACK2, and DASHATTACK_RECOVER) to the end of the combo (I would put it after the ATTACK3 state and before the jumpattack states). Then you need to change from this:
State("DASHATTACK2")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
BlendTimeTo("stand_attack1c", 0.4);
}
to this:
State("DASHATTACK2")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
BlendTimeTo("stand_gam_guard", 0.4);
}
Your first tip should be that you're trying to reference an animation that doesn't exist - however, the reason you not only change the animation but move the state as well is because that animation hasn't been declared (animations need to be declared before they can be referenced in BlendTimes).
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random Crashes caused by Custom Melee Unit?

Post by AQT »

So I fixed up the combo according to your advice like so:
Hidden/Spoiler:
OffhandAnimation("stand_useforce", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("stand_useforce", "CHARGE");

State("IDLE")
{
Duration(0.0); // infinite duration
EnergyRestoreRate(); // (0.0, "FromSoldier")
InputLock(0.15, "Sprint", "Jump", "Crouch");

TurnOffLightsaber();

Transition("DEFLECT")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Energy(">=", 2.5); // at least half a second worth of deflect time
Button("FireSecondary", "Press");
}
}
Transition("BACK_ATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
Thrust(">", 0.25);
ThrustAngle(135, 225);
}
}
Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
}
}
Transition("DASHATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Sprint");
Button("Fire", "Press");
}
}
Transition("JUMPATTACK_FALL")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Jump");
//The following should be true during a jetjump, jump, or fall
// unless we're more than 0.35 seconds from the apex
//NOTE: This may not allow luke to jump attack during longer falls
// or falling from a force jump when it could.
VelocityY(">", -6.3);
TimeInPosture(">", 0.25);
Button("Fire", "Press");
}
}
}

State("DEFLECT")
{
Posture("Stand");
Sound("imp_weap_lightsabre_block");

//TurnoffLightsaber();

Animation("stand_block_idle")
{
Loop();
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
LowResPose(0, "Frames");
}

Duration(0.0); // infinite duration, looping anim

InputLock(0.0, "All", "!Thrust"); // lock all but move controller for duration of state
EnergyRestoreRate(-10.0); // drain energy while ready to deflect
Deflect()
{
DeflectAngle(-110, 110); // deflect anything from forward arc
EnergyCost(0.0);

DeflectAnimation("stand_block_front1", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_front2", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left1", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left2", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right1", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right2", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
}

Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Fire", "Press");
}
}
Transition("DEFLECT_ROLL") // same as the code checking for rolling
{
EnergyCost(25.0);
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
Thrust(">", 0.9);
ThrustAngle(-120, 120);
}
}
Transition("DEFLECT_CROUCH")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
}
}
Transition("DEFLECT_JUMP")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Jump", "Press");
}
}
Transition("DEFLECT_SPRINT")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Sprint", "Down");
}
}
Transition("IDLE")
{
If()
{
Break();
Energy("<=", 0.0); // if no energy left
}
Or()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Sprint");
}
Or()
{
Break(20, "Frames"); // all transitions are breaking if Duration is 0
Button("FireSecondary", "Press");
}
Or()
{
Break(); // all transitions are breaking if Duration is 0
Button("Reload", "Press");
}
}
}

State("DEFLECT_JUMP")
{
Posture("Jump");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_CROUCH")
{
Posture("Crouch");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_ROLL")
{
Posture("Roll");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_SPRINT")
{
Posture("Sprint");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("BACK_ATTACK")
{
Posture("Stand");
Animation("stand_attack_backwards")
{
BlendInTime(0.15);
BlendOutTime(0.15);
}

Sound("com_weap_throw", 4, "Frames");

Duration(35, "Frames");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(6, 10, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(6.0);
}

Attack()
{
DamageTime(17, 22, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(6.0);
}

Transition("IDLE");
}

//Forward declare animations to allow BlendTimeTo references:
Animation("stand_vaderdash");
Animation("stand_obiwan1b");
Animation("stand_obiwan1b_end");
Animation("stand_gam_guard");

// Vader's dash attack - NOT _full
State("ATTACK1")
{
Posture("Stand");
Animation("stand_vaderdash")
{
//SyncType("sidious1");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_obiwan1b", 0.15);
}

Sound("com_weap_throw");

AlignedToThrust();

Attack()
{
DamageTime(2, 7, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(300);
Push(5.0);
}

Transition("ATTACK2")
{
If()
{
Break(13, "Frames");
TimeStart(5, "Frames");
TimeEnd(20, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("IDLE");
}

// Obiwan final attack - _full
State("ATTACK2")
{
Posture("Stand");
Animation("stand_obiwan1b")
{
//SyncType("sidious1");
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
BlendTimeTo("stand_obiwan1b_end", 0.0);
}
Sound("com_weap_throw");

//set a duration
AlignedToThrust();

// StrafeFactor(0.5);
// TurnFactor(0.5);

Attack()
{
DamageTime(-3, 7, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(5.0);
}

Transition("RECOVER2_ATTACK")
{
If()
{
Break(16, "Frames");
TimeStart(6, "Frames");
TimeEnd(16, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}

Transition("RECOVER2");
}

State("RECOVER2")
{
Posture("Stand");
Animation("stand_obiwan1b_end")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
}

AlignedToThrust();

Transition("IDLE");
}

State("RECOVER2_ATTACK")
{
Posture("Stand");
Animation("stand_obiwan1b_end")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
}

AlignedToThrust();

Duration(7, "Frames");

Transition("ATTACK3");
}

State("ATTACK3")
{
Posture("Stand");
Animation("stand_gam_guard")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.3);
}
Sound("com_weap_throw", 6, "Frames");

//set a duration
//Duration(30, "Frames");
AnimatedMove() // animation controls velocity for entire state
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(6.0);
VelocityFromStrafe(2.0);
}
AlignedToThrust();

TurnFactor(0.5);

Duration(45, "Frames");

InputLock("All", "!Thrust"); // lock all controls for duration of state
Attack()
{
DamageTime(14, 24, "Frames");
DamageLength(1.5);
DamageWidth(1.25);
Damage(600);
Push(10.0);
}

Transition("IDLE");
}

State("DASHATTACK")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
}
Sound("com_weap_throw");

AnimatedMove()
{
VelocityZ(17.0);
VelocityX(0.0);
VelocityFromThrust(0.5);
VelocityFromStrafe(0.5);
// Until()
// {
// Break(16, "Frames");
// }

}
TurnFactor(0.3);

Duration(10, "Frames");

InputLock("All", "!Thrust");

Attack()
{
DamageTime(4, 10, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(800);
Push(14.0);
}

Transition("DASHATTACK2");
}

State("DASHATTACK2")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
BlendTimeTo("stand_gam_guard", 0.4);
}

Duration(30, "Frames");

AnimatedMove()
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(0.5);
VelocityFromStrafe(0.5);
}
TurnFactor(0.3);

InputLock("All", "!Thrust");

Transition("DASHATTACK_RECOVER");
}

State("DASHATTACK_RECOVER")
{
Posture("Stand");
Animation("stand_dashattackend")
{
BlendInTime(0.10);
BlendOutTime(0.25);
}

AlignedToThrust();

TurnFactor(0.3);

InputLock("All", "!Thrust", "!Fire");

Transition("IDLE");
}

State("JUMPATTACK_FALL")
{
Posture("Jump");

TurnoffLightsaber();

Animation("jumpattack_fall")
{
Loop("FinalFrame");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
// BlendTimeTo("jumpattack_land", 0.15);
}

Sound("com_weap_throw");

Duration(0);


EnergyRestoreRate(0.0);

Gravity(4.0);
GravityVelocityTarget(-20.0); // accelerate us
AnimatedMove();
InputLock("All", "!Thrust"); // lock all buttons for duration of state

Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
}
}
Transition("IDLE")
{
If()
{
Break();
Posture("Any", "!Stand", "!Jump", "!Jet");
}
}
}

State("JUMPATTACK_LAND")
{
Posture("Stand");

TurnoffLightsaber();

Animation("jumpattack_land")
{
AimType("FullBody");
//SyncType("jumpattack_land", "ByTime");
BlendInTime(0.00);
BlendOutTime(0.20);
}

RestartAnimation();
Duration(4, "Frames");

EnergyRestoreRate(0.0);

AnimatedMove();
InputLock("All");

Transition("JUMPATTACK_LAND2");
}

State("JUMPATTACK_LAND2")
{
Posture("Stand");

TurnoffLightsaber();

Animation("jumpattack_land")
{
AimType("FullBody");
//SyncType("jumpattack_land", "ByTime");
BlendInTime(0.00);
BlendOutTime(0.20);
}

EnergyRestoreRate(0.0);

PlayExplosion(); // yep...

AnimatedMove();
InputLock("All");
}
Then I munged my sides. In-game, my map still crashes a few seconds into playing as the unit. It tends to crash when I either block or block and deflect. Is there anything else wrong with my combo? I've also removed the dark_sabre_stand_idle_emote_full file from my animation's folder since it's just the human_sabre one.
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: Random Crashes caused by Custom Melee Unit?

Post by MetalcoreRancor »

Try what I said.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random Crashes caused by Custom Melee Unit?

Post by AQT »

1. The unit dies like a human.

2. There aren't any rancors or death pits on my map.

3. When the unit does the last swing of the combo while moving, it slides.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Random Crashes caused by Custom Melee Unit?

Post by DarthD.U.C.K. »

3. that sounds like you "forgot" to lock the keys in the combo while playing the last swing anim
maybe you used an unit that normally can walk while doing the last swing
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Random Crashes caused by Custom Melee Unit?

Post by Maveritchell »

DarthD.U.C.K. wrote:3. that sounds like you "forgot" to lock the keys in the combo while playing the last swing anim
maybe you used an unit that normally can walk while doing the last swing
That state is directly lifted from the Emperor's combo, the animated move is part of it. With the Emperor it probably doesn't matter, since his feet don't move normally.
Post Reply