OffhandAnimation("stand_useforce", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("stand_useforce", "CHARGE");
ThrowAnimation("David_sabre_stand_throw");
State("CATCH_SABRE")
{
Posture("Stand");
Sound("saber_catch")
Animation("David_sabre_stand_catch")
{
AimType("None");
BlendOutTime(0.2);
}
TurnOffLightsaber(1);
InputLock("All", "!Thrust");
AlignedToThrust();
}
State("IDLE")
{
Duration(0.0); // infinite duration
EnergyRestoreRate(); // (0.0, "FromSoldier")
InputLock(0.15, "Sprint", "Jump", "Crouch");
TurnOffLightsaber(1);
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("Fire", "Hold");
}
}
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", "Tap");
}
}
}
State("DASHATTACK")
{
Posture("Stand");
Animation("David_sabre_stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
}
Sound("saber_triple");
Deflect()
{
DeflectAngle(-110, 110); // deflect anything from forward arc
EnergyCost(2.0);
}
Duration(25, "Frames");
AnimatedMove()
{
VelocityZ(16.0);
VelocityX(0.0);
VelocityFromThrust(2.0);
VelocityFromStrafe(5.0);
}
TurnFactor(0.6);
InputLock("All", "!Thrust");
Attack()
{
AttacKID("dashattack");
DamageTime(2, 45, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(500);
Push(5.0);
}
// Transition("DASHATTACK2")
// {
// If()
// {
// TimeStart(0.0);
// TimeEnd(0.05, "FromEnd"); //, "SyncIfOvertime");
// Button("Fire", "Press");
// }
// }
Transition("DASHATTACK2");
}
State("DASHATTACK2")
{
Posture("Stand");
Animation("David_sabre_stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
}
Sound("saber_double");
AnimatedMove()
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(1.0);
VelocityFromStrafe(2.0);
If()
{
Break(40, "Frames");
}
}
TurnFactor(0.6);
InputLock("All", "!Thrust");
Attack()
{
AttacKID("dashattack");
DamageTime(2, 45, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(500);
Push(5.0);
}
Transition("IDLE");
}
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", "Jet");
Button("Fire", "Press");
}
}
State("DEFLECT")
{
Posture("Stand");
Sound("imp_weap_lightsabre_block");
Animation("David_sabre_stand_block_idle_full")
{
Loop();
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
LowResPose(0, "Frames");
}
// disable the awesome edge
TurnOffLightsaber(1);
Duration(0.0); // infinite duration, looping anim
EnergyRestoreRate(-10.0); // drain energy while ready to deflect
Deflect()
{
DeflectAngle(-110, 110); // deflect anything from forward arc
EnergyCost(0.0);
DeflectAnimation("David_sabre_stand_block_front1", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("David_sabre_stand_block_front2", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("David_sabre_stand_block_left1", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("David_sabre_stand_block_left2", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("David_sabre_stand_block_right1", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("David_sabre_stand_block_right2", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
}
Transition("IDLE")
{
If()
{
Break();
Energy("<=", 0.0); // if no energy left
}
Or()
{
Break(20, "Frames"); // all transitions are breaking if Duration is 0
Button("Fire", "Up");
}
}
}
State("BACK_ATTACK")
{
Posture("Stand");
Animation("David_sabre_stand_attack_backwards")
{
BlendInTime(0.15);
BlendOutTime(0.3);
}
Sound("saber_swing");
// disable the awesome edge
TurnOffLightsaber(1);
InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(4, 9, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(400);
Push(6.0);
}
Attack()
{
DamageTime(13, 20, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(400);
Push(6.0);
}
Transition("IDLE") // last transition specified in this state, taken by default at the end of the animation...
{
If()
{
Posture("!Stand");
}
}
}
//Forward declare animations to allow BlendTimeTo references:
Animation("David_sabre_stand_attack1b_end");
Animation("David_sabre_stand_attack1c");
State("ATTACK1")
{
Posture("Stand");
Animation("David_sabre_stand_attack1a");
Sound("saber_swing");
// disable the awesome edge
TurnOffLightsaber(1);
InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(5, 9, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(3.0);
}
Transition("ATTACK2")
{
If()
{
TimeStart(5, "Frames");
TimeEnd(16, "Frames");
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("IDLE")
{
If()
{
Posture("!Stand");
}
}
Transition("RECOVER1");
}
State("RECOVER1")
{
Posture("Stand");
Animation("David_sabre_stand_attack1a_end")
{
// SyncType("attack1b", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
}
// disable the awesome edge
TurnOffLightsaber(1);
InputLock("All", "!Thrust");
AlignedToThrust();
Transition("IDLE") // last transition specified in this state, taken by default at the end of the animation...
{
If()
{
Posture("!Stand");
}
}
}
State("ATTACK2")
{
Posture("Stand");
Animation("David_sabre_stand_attack1b")
{
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
BlendTimeTo("stand_attack1b_end", 0.0);
BlendTimeTo("stand_attack1c", 0.0);
}
Sound("saber_swing");
// disable the awesome edge
TurnOffLightsaber(1);
InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(7, 12, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(3.0);
}
Transition("ATTACK3")
{
If()
{
TimeStart(7, "Frames");
TimeEnd(17, "Frames");
Posture("Stand");
Button("Fire", "Press");
}
}
// hey, it's a secret!
Transition("MAUL_ATTACK1")
{
If()
{
TimeStart(7, "Frames");
TimeEnd(17, "Frames");
Posture("Stand");
Button("Reload", "Press");
}
}
Transition("IDLE")
{
If()
{
Posture("!Stand");
}
}
Transition("RECOVER2");
}
State("RECOVER2")
{
Posture("Stand");
Animation("David_sabre_stand_attack1b_end")
{
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
}
// disable the awesome edge
TurnOffLightsaber(1);
InputLock("All", "!Thrust");
AlignedToThrust();
Transition("IDLE") // last transition specified in this state, taken by default at the end of the animation...
{
If()
{
Posture("!Stand");
}
}
}
State("ATTACK3")
{
Posture("Stand");
Animation("David_sabre_stand_attack1c")
{
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
}
Sound("saber_attack_three");
// disable the awesome edge
TurnOffLightsaber(1);
//set a duration so we will go to state RECOVER3 before the animation ends
Duration(20, "Frames");
AnimatedMove() // animation controls velocity for entire state
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(12.0);
VelocityFromStrafe(3.0);
}
AlignedToThrust();
InputLock("All", "!Thrust"); // lock all controls for duration of state
Attack()
{
DamageTime(4, 11, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(600);
Push(5.0);
}
Attack()
{
AttackID("Attack3-1");
DamageTime(19, 23, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(600);
Push(5.0);
}
Transition("IDLE")
{
If()
{
Posture("!Stand");
}
}
Transition("MACE_STAB")
{
EnergyCost(30);
If()
{
Break(17, "Frames"); // break 1 frame BEFORE the transition ends!!!
TimeStart(7, "Frames");
TimeEnd(18, "Frames");
Posture("Stand");
Button("Reload", "DoubleTap");
}
}
Transition("RECOVER3");
}
// a bit suave, we first make Luke unable to move as he lands from the jump...
State("RECOVER3")
{
Posture("Stand");
Animation("David_sabre_stand_attack1c"); // note that it just continues the 3rd attack's animation, since the end is the same
Duration(37, "Frames");
AlignedToThrust();
TurnOffLightsaber(1);
InputLock("All", "!Thrust"); // lock all controls for duration of state
Attack()
{
AttackID("Attack3-1");
DamageTime(19, 23, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(600);
Push(5.0);
}
AnimatedMove()
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(0.5);
VelocityFromStrafe(0.5);
}
ThrustFactor(0.0);
TurnFactor(0.1);
Transition("IDLE")
{
If()
{
Posture("!Stand");
}
}
Transition("RECOVER3_WALK"); // no conditions means this transition will be taken at the end of the state
}
State("RECOVER3_WALK")
{
Posture("Stand");
Animation("David_sabre_stand_attack1c"); // still continuing the animation...
// disable the awesome edge
TurnOffLightsaber(1);
AlignedToThrust();
InputLock("All", "!Thrust"); // lock all controls for duration of state
Transition("IDLE") // last transition specified in this state, taken by default at the end of the animation...
{
If()
{
Posture("!Stand");
}
}
}
State("MACE_STAB")
{
Posture("Stand");
Animation("David_sabre_mace_stab")
{
AimType("FullBody");
BlendInTime(0.15);
BlendOutTime(0.20);
}
// disable the awesome edge
TurnOffLightsaber(1);
Attack()
{
AttackID("Earthquake");
DamageTime(0, 4, "Frames");
DamageLength(4.0);
DamageWidth(4.0);
Damage(1000);
}
RestartAnimation();
Duration(4, "Frames");
EnergyRestoreRate(0.0);
AnimatedMove();
InputLock("All");
Transition("IDLE")
{
If()
{
Posture("!Stand");
}
}
Transition("MACE_STAB2");
}
State("MACE_STAB2")
{
Posture("Stand");
// disable the awesome edge
TurnOffLightsaber(1);
// no duration means last as long as the animation does
Attack()
{
AttackID("Earthquake");
DamageTime(0, 6, "Frames");
DamageLength(1.5);
DamageWidth(0.5);
Damage(0);
}
Animation("David_sabre_mace_stab");
EnergyRestoreRate(0.0);
PlayExplosion(); // yep...additional damage and an effect!
AnimatedMove()
{
Until() // same as If()
{
Break(26, "Frames");
}
}
InputLock("All");
Transition("IDLE") // last transition specified in this state, taken by default at the end of the animation...
{
If()
{
Posture("!Stand");
}
}
}
State("MACE_STAB")
{
Posture("Stand");
Animation("David_sabre_mace_stab")
{
AimType("FullBody");
BlendInTime(0.15);
BlendOutTime(0.20);
}
// disable the awesome edge
TurnOffLightsaber(1);
Attack()
{
AttackID("Earthquake");
DamageTime(0, 4, "Frames");
DamageLength(4.0);
DamageWidth(4.0);
Damage(1000);
}
RestartAnimation();
Duration(4, "Frames");
EnergyRestoreRate(0.0);
AnimatedMove();
InputLock("All");
Transition("IDLE")
{
If()
{
Posture("!Stand");
}
}
Transition("MACE_STAB2");
}
State("MACE_STAB2")
{
Posture("Stand");
// disable the awesome edge
TurnOffLightsaber(1);
// no duration means last as long as the animation does
Attack()
{
AttackID("Earthquake");
DamageTime(0, 6, "Frames");
DamageLength(1.5);
DamageWidth(0.5);
Damage(0);
}
Animation("David_sabre_mace_stab");
EnergyRestoreRate(0.0);
PlayExplosion(); // yep...additional damage and an effect!
AnimatedMove()
{
Until() // same as If()
{
Break(26, "Frames");
}
}
InputLock("All");
Transition("IDLE") // last transition specified in this state, taken by default at the end of the animation...
{
If()
{
Posture("!Stand");
}
}
}
State("DASHATTACK")
{
Posture("Stand");
Animation("David_sabre_stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
}
Sound("saber_attack_three");
// disable the awesome edge
TurnOffLightsaber(1);
InputLock("All", "!Thrust");
Duration(22, "Frames");
AnimatedMove()
{
VelocityZ(15.0);
VelocityX(0.0);
VelocityFromThrust(5.0);
VelocityFromStrafe(1.0);
}
TurnFactor(0.3);
Attack()
{
DamageTime(2, 9, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(400);
Push(3.0);
}
Attack()
{
DamageTime(12, 16, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(400);
Push(3.0);
}
Transition("DASHATTACK2")
{
If()
{
Break(21, "Frames");
TimeStart(17, "Frames");
TimeEnd(22, "Frames");
Posture("Stand", "Sprint");
Button("Fire", "Press");
}
}
Transition("IDLE") // last transition specified in this state, taken by default at the end of the animation...
{
If()
{
Posture("!Stand");
}
}
}
State("DASHATTACK2")
{
Posture("Stand");
Animation("David_sabre_stand_dashattack");
Sound("saber_swing", 34, "Frames");
// disable the awesome edge
TurnOffLightsaber(1);
Duration(38, "Frames");
AnimatedMove()
{
VelocityZ(10.0);
VelocityX(0.0);
VelocityFromThrust(5.0);
VelocityFromStrafe(3.0);
If()
{
Break(38, "Frames");
}
}
TurnFactor(0.3);
InputLock("All", "!Thrust");
Attack()
{
AttackID("Dash2");
DamageTime(35, 43, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(600);
Push(5.0);
}
Transition("IDLE")
{
If()
{
Posture("!Stand");
}
}
Transition("DASHATTACK3");
}
State("DASHATTACK3")
{
Posture("Stand");
Animation("David_sabre_stand_dashattack");
TurnOffLightsaber(1);
AnimatedMove()
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(0.5);
VelocityFromStrafe(0.5);
If()
{
Break(43, "Frames");
}
}
TurnFactor(0.3);
InputLock("All", "!Thrust");
Attack()
{
AttackID("Dash2");
DamageTime(35, 43, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(600);
Push(5.0);
}
Transition("IDLE") /
{
If()
{
Posture("!Stand");
}
}
}
// forward declare jumpattack_land, since jumpattack_fall refers to it:
Animation("David_sabre_jumpattack_land");
State("JUMPATTACK_FALL")
{
Posture("Jump");
Animation("David_sabre_jumpattack_fall")
{
Loop("FinalFrame");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.80);
}
Sound("saber_attack_three");
// disable the awesome edge
TurnOffLightsaber(1);
GravityVelocityTarget(-2.0, "Impulse"); // accelerate us to 20m/s down at 2 g's
AnimatedMove();
InputLock("All", "!Thrust"); // lock all buttons for duration of state
Attack()
{
AttackId("JUMPATTACK");
DamageTime(0.33, 1.0, "FromAnim");
DamageLength(1.75);
DamageWidth(1.25);
Damage(800);
Push(4.0);
}
Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
}
}
Transition("IDLE")
{
If()
{
Break();
Posture("Any", "!Stand", "!Jump", "!Jet");
}
}
Transition("JUMPATTACK_END")
}
State("JUMPATTACK_END")
{
Posture("Jump");
Animation("David_sabre_jumpattack_end")
{
AimType("None");
SyncType("jumpattack_land", "ByTime");
BlendInTime(0.15);
BlendOutTime(0.80);
}
// disable the awesome edge
TurnOffLightsaber(1);
Duration(15, "Frames");
AnimatedMove();
InputLock("All", "!Thrust"); // lock all buttons for duration of state
Attack()
{
AttackId("JUMPATTACK");
DamageTime(0, 6, "Frames");
DamageLength(1.75);
DamageWidth(1.25);
Damage(800);
Push(4.0);
}
Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
}
}
Transition("IDLE")
{
If()
{
Break();
Posture("Any", "!Stand", "!Jump", "!Jet");
}
}
}
State("JUMPATTACK_LAND")
{
Posture("Stand");
Animation("David_sabre_jumpattack_land")
{
AimType("FullBody");
SyncType("jumpattack_end", "ByTime");
BlendInTime(0.15);
BlendOutTime(0.20);
}
AnimatedMove();
InputLock("All");
// disable the awesome edge
TurnOffLightsaber(1);
Attack()
{
AttackId("JUMPATTACK");
DamageTime(0, 6, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(800);
Push(4.0);
}
Transition("IDLE")
{
If()
{
Break(0.4);
ButtonsPressed("Any");
}
Or()
{
Break(0.4);
Thrust(">", 0.54);
}
}
}