Page 1 of 1

Novice: Slight problem with a Jedi...

Posted: Mon Mar 24, 2008 10:28 pm
by vampire_lord
I have read the rules and for the most part this seems to be the right place to put my question...

Recently I decided to add a Jedi unit to my current WIP, I found most of the needed documentation on its creation and I got even some good experiments working like a "better" jedi jump, BUT, I got some problems with animations I think.

My jedi has basically Obi-Wan's attack animations except by dash attack and the 2nd attack (that's Mace Windu's), a default 2 stage dash attack was better for me; anyway, my problem is the strafing attacks, if I am strafing to the left all looks normal, but if I am strafing to the right and attack the character faces to the left while using attacks 1st and 3rd, only the 2nd is normal strangely enough because it is one of the "new" animations; maybe it has something to do with the combo file being practically Obi-Wan's (except for the 2 stage dash attack), I can't find anything to figure the problem and how to fix it, if someone can help me it would be useful and if you give me some advice on it before attempting to insert more attack stages better.

Thanks in Advace, I hope to post some progress on my map later, I just want my sides working better...

Re: Novice: Slight problem with a Jedi...

Posted: Mon Mar 24, 2008 10:44 pm
by Maveritchell
When you made the new animations, how did you set it up?

Each Jedi has two parts that define what it looks like when it attacks: a .combo file, which defines what buttonpresses cause what to happen, and the animation files (.zafbin, .zaabin, and .anims). When you set up the Jedi, did you just switch around attacks in the .combo file and use a premade set of animations? That might cause the problem you're describing.

And welcome to GT!

Re: Novice: Slight problem with a Jedi...

Posted: Mon Mar 24, 2008 10:49 pm
by woner11
I was just playing as mace, and his secondary attack which I think you said you used makes him go the opposite direction. Maybe I was looking at the wrong attack. Ya, but check your combo file like Mav said and welcome to GT! gtpwn

Re: Novice: Slight problem with a Jedi...

Posted: Tue Mar 25, 2008 12:49 am
by vampire_lord
I used a premade combo (Obi-Wan) and a few other animation stances...

Here is the list from the ANIM file:
Hidden/Spoiler:
"sith_sabre_jump_backward_full" --------------------from Darth Maul
"sith_sabre_jump_full" ------------------------------from Dooku
"sith_sabre_jump_left_full" --------------------------from Darth Maul
"sith_sabre_jump_right_full" -------------------------from Darth Maul
"sith_sabre_stand_attack1a_end_full" --------------- from Obi-Wan
"sith_sabre_stand_attack1a_full" --------------------from Obi-Wan
"sith_sabre_stand_attack1b_end_full" ----------------from Mace Windu
"sith_sabre_stand_attack1b_full" --------------------from Mae Windu
"sith_sabre_stand_attack1c_full" ---------------------from Obi-Wan
"sith_sabre_stand_attack_backwards" ----------------from Dooku
"sith_sabre_stand_idle_emote_full" --------------------from Darth Maul
"sith_sabre_stand_walkbackwards_full" ----------------from Darth Maul (to be removed maybe, unrelated)
And the COMBO file code:
Hidden/Spoiler:
OffhandAnimation("stand_useforce", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("stand_useforce", "CHARGE");

Animation("stand_attack1a_end");
Animation("stand_attack1b");
Animation("stand_attack1a_upper")
{
AimType("None");
BlendInTime(0.0);
BlendOutTime(0.15);
BlendTimeTo("stand_attack1a_end", 0.0);
BlendTimeTo("stand_attack1b", 0.0);
}
Animation("stand_attack1a_lower")
{
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_attack1a_end", 0.0);
BlendTimeTo("stand_attack1b", 0.0);
}
ThrowAnimation("stand_throw");

State("CATCH_SABRE")
{
Posture("Stand");
// Sound("saber_catch");
Animation("stand_catch")
{
AimType("None");
BlendOutTime(0.2);
}

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

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

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", "Jet");
//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);
Button("Fire", "Press");
}
}
}

State("DEFLECT")
{
Posture("Stand");
Sound("imp_weap_lightsabre_block");
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(-180, 180); // 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(-180, 180);
}
}
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.3);
}

Sound("saber_swing");

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");
}

//Forward declare animations to allow BlendTimeTo references:
Animation("stand_attack1a");
Animation("stand_attack1a_end);
Animation("stand_attack1b");
Animation("stand_attack1b_end");
Animation("stand_attack1c");
Animation("stand_attack1d");

State("ATTACK1")
{
Posture("Stand");
Animation("stand_attack1a");
Sound("saber_swing");

Deflect()
{
DeflectAngle(-180, 180);
EnergyCost(0.0);
}

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(2, 8, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(300);
Push(3.0);
}

Transition("ATTACK2")
{
If()
{
Break(10, "Frames");
TimeStart(5, "Frames");
TimeEnd(16, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("RECOVER1");
}

State("RECOVER1")
{
Posture("Stand");
Animation("stand_attack1a_end")
{
// SyncType("attack1b", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
}

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

Transition("IDLE");
}

State("ATTACK2")
{
Posture("Stand");
Animation("stand_attack1b")
{
// SyncType("attack1b", "ByTime");
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
BlendTimeTo("stand_attack1b_end", 0.0);
BlendTimeTo("stand_attack1c", 0.0);
}
Sound("saber_swing");

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

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

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

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

Transition("IDLE");
}

State("ATTACK3")
{
Posture("Stand");
Animation("stand_attack1c")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
}
Sound("saber_attack_three");

Deflect()
{
DeflectAngle(-180, 180);
EnergyCost(0.0);
}

//set a duration so we will go to state RECOVER3 before the animation ends
Duration(30, "Frames");
// AnimatedMove() // animation controls velocity for entire state
// {
// VelocityZ(0.0);
// VelocityX(0.0);
// VelocityFromThrust(8.0);
// VelocityFromStrafe(3.0);
// }
AlignedToThrust("Initial");

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

InputLock("All", "!Thrust"); // lock all controls for duration of state
Attack()
{
DamageTime(6, 23, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(600);
Push(5.0);
}

Transition("RECOVER3");
}

State("RECOVER3")
{
Posture("Stand");
Animation("stand_attack1c");

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

Transition("IDLE");
}

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

Deflect()
{
DeflectAngle(-180, 180); // deflect anything from forward arc
EnergyCost(2.0);
}

Duration(21, "Frames");
AnimatedMove()
{
VelocityZ(15.0);
VelocityX(0.0);
VelocityFromThrust(5.0);
VelocityFromStrafe(1.0);
}
TurnFactor(0.3);

InputLock("All", "!Thrust");
Attack()
{
DamageTime(2, 9, "Frames");
DamageLength(2.0);
DamageWidth(0.5);
Damage(500);
}
Attack()
{
DamageTime(12, 16, "Frames");
DamageLength(2.0);
DamageWidth(0.75);
Damage(500);
}

Transition("DASHATTACK2")
{
If()
{
TimeStart(0.4);
TimeEnd(0.05, "FromEnd"); //, "SyncIfOvertime");
Button("Fire", "Press");
}
}
Transition("IDLE");
}

State("DASHATTACK2")
{
Posture("Stand");
Animation("stand_dashattack");
Sound("saber_swing", 29, "Frames");

AnimatedMove()
{
VelocityZ(15.0);
VelocityX(0.0);
VelocityFromThrust(5.0);
VelocityFromStrafe(1.0);
If()
{
Break(43, "Frames");
}
}
TurnFactor(0.3);

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

Attack()
{
DamageTime(35, 43, "Frames");
DamageLength(2.0);
DamageWidth(0.75);
Damage(400);
}

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

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

State("JUMPATTACK_FALL")
{
Posture("Jump");
Animation("jumpattack_fall")
{
Loop("FinalFrame");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.80);
// BlendTimeTo("jumpattack_land", 0.15);
}
Sound("saber_swing", 3, "Frames");

Gravity(2.0);
GravityVelocityTarget(-20.0); // 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("jumpattack_end")
{
AimType("None");
SyncType("jumpattack_land", "ByTime");
BlendInTime(0.15);
BlendOutTime(0.80);
// BlendTimeTo("jumpattack_land", 0.15);
}

Gravity(2.0);
GravityVelocityTarget(-20.0); // accelerate us to 20m/s down at 2 g's
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);
}

Deflect()
{
DeflectAngle(-180, 180);
EnergyCost(0.0);
}

Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
}
}

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

Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
Button ("Jump", "Press");
}
}

Transition("IDLE");
}
State("JUMPATTACK_LAND")
{
Posture("Stand");

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

AnimatedMove();
InputLock("All");

Attack()
{
AttackId("JUMPATTACK");
DamageTime(0, 6, "Frames");
DamageLength(1.75);
DamageWidth(.75);
Damage(800);
Push(4.0);
}

Transition("IDLE")
{
If()
{
Break(0.4);
ButtonsPressed("Any");
}
Or()
{
Break(0.4);
Thrust(">", 0.54);
}
}
}
I plan to remove the saber throw instances because my Jedi doesn't use saber throw (too cheap in my opinion), aside from that the only added lines were the 2 stages on dash attack.

Stilll checking it, there is no difference while trying to check Mace's combo differences in the same instances.

OFFTOPIC:

I wanna share my Jedi Jump code, it may have been done before, but nobody is hurt if I post it, I can only say one thing in my defense... I just tampered while trying to get rid of multiple jumps and make it like the actual jedi high jump, I got a good result for the most part.
Hidden/Spoiler:
JetJump = "22.0"
JetPush = "0.0"
JetAcceleration = "30.0"
JetEffect = ""
JetType = "hover"
JetFuelRechargeRate = "0.25"
JetFuelCost = "1.0"
JetFuelInitialCost = "1.0"
JetFuelMinBorder = "0.8"
JetShowHud = 0
JetEnergyDrain = 40.0
What is the effect? well, pretty much like Dark Troopers, higher jumps can be done by tapping Jump twice rather than paused, no more jumps of course, doing it forward gives you a good push and has recovery time, you can reach the top of Mos Eisley's docking bay with quick jumping, slow fall, once you recover from the fall you can do it again, I tried to calculate the fuel recovery and the stamina use to not allow extra more jumps or extra more hovering time; I hope any other modder like it.

Re: Novice: Slight problem with a Jedi...

Posted: Tue Mar 25, 2008 1:43 am
by Maveritchell
Huh. Can't say offhand what the problem is; it looks like you set up your new animationset right. I was concerned that maybe you modified the combo but did nothing to the animations. (Glad to see that you actually read jedi_creation, though.)

If it's not too much to ask, maybe you could share a video or something of what's going on? I've never come across this issue before, and a visual aid (even if it's just some pictures) would be very helpful.

Re: Novice: Slight problem with a Jedi...

Posted: Tue Mar 25, 2008 7:06 am
by vampire_lord
OK, here you go, too bad I don't know if we can actually embed youtube videos (neither i know how to do it here), anyway as you can see the only attack working properly in the said situation is actually the one from a different animation asset.

Strafe attacking to the "Right" STAGE 1
Hidden/Spoiler:
Image
Strafe attacking to the Left STAGE 2
Hidden/Spoiler:
Image
Strafe attacking to the Right STAGE 2
Hidden/Spoiler:
Image
Strafe attacking to the Left STAGE 3
Hidden/Spoiler:
Image
Strafe attacking to the "Right" STAGE 3
Hidden/Spoiler:
Image
VIDEO DEMOSTRATION HERE!

I hope you can help me to fix the problem, because it doesn't make any sense to me... and yes, I really like the Jedi Jump.

Re: Novice: Slight problem with a Jedi...

Posted: Tue Mar 25, 2008 10:14 am
by Crazy_Ewok
It looks like Maul's basepose. Anyways, your problem isn't too bad I had a hard time noticing anything wrong, most people playing your map would just say, hey that's cool. If your jedi's feet didn't move at all that might be bad. Also nice jedi jump.

Re: Novice: Slight problem with a Jedi...

Posted: Tue Mar 25, 2008 10:45 am
by woner11
What weapon are you using? Make sure it is citing the right combo.

Re: Novice: Slight problem with a Jedi...

Posted: Tue Mar 25, 2008 12:20 pm
by Teancum
That's probably not the issue since all the other anims work.

Re: Novice: Slight problem with a Jedi...

Posted: Tue Mar 25, 2008 12:27 pm
by woner11
You could try giving the animation to a different character/ different combo and see if that changes anything.