Page 1 of 1

A most peculiar finding, and dilemma.

Posted: Sat Feb 21, 2009 12:52 am
by MetalcoreRancor
http://www.xfire.com/video/7d2cd/

If you watch this footage, you'll notice that the Rancor is doing things no jedi has done before... you might think that you're on drugs and that isn't really happening, but yes I got Gravity working. The problem is, during this state of flying, you are in "jump" and as a jedi, its not rigged for the character to fire a secondary in this condition, so it creates a dilemma where if you hold the secondary, you begin to descend back down, but if you touch the ground you fly up. This isn't shown in the video, but its a result of work after the video.

I have since then created a means for the rancor to descend by pressing the attack button, but players can chain levitations by pressing attack while falling down.

So what is it I'm asking of you smart folks? To tell me how to structure this technology so jedi can fire rockets/bombs while in this state.. and if they cant, offer suggestions of how to set it up so they can do something. :S

Heres my Combo, and odf.
Hidden/Spoiler:
Animation("stand_attack1a_upper")
{
AimType("None");
BlendInTime(0.0);
BlendOutTime(0.3);
BlendTimeTo("stand_attack1a_end", 0.0);
BlendTimeTo("stand_attack1b", 0.2);
}
Animation("stand_attack1a_lower")
{
BlendInTime(0.3);
BlendOutTime(0.3);
BlendTimeTo("stand_attack1a_end", 0.0);
BlendTimeTo("stand_attack1b", 0.15);
}
State("IDLE")
{
Duration(0.0); // infinite duration
EnergyRestoreRate(); // (0.0, "FromSoldier")

RemapReloadButton("Crouch")
Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("BASHATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Sprint");
Button("Fire", "Press");
}
}
Transition("JUMPSPRING")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Jump");
Button("Fire", "Press");
}
}
Transition("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 leave too little time for the jumpattack_fall anim
// to play if darth is jetting very close to the ground, and may
// not allow darth to jump attack during a long fall from high up.
//VelocityY(">", -6.3);
Button("Crouch", "Press");
}
}

}

State("ATTACK1")
{
Posture("Stand");
Animation("stand_attack1")
{

AimType("FullBody");
BlendInTime(0.15);
BlendOutTime(0.15);
}

Sound("rancor_amb", 15, "Frames");

//set a duration so we will go to state RECOVER3 before the animation ends

AlignedToThrust();

Duration(3, "Seconds")

StrafeFactor(0.5);
TurnFactor(0.5);

InputLock(0.0,"Sprint", "Jump", "Crouch", "Roll");

Attack()
{
Edge(0);
DamageTime(0.1, 1, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}
Attack()
{
Edge(1);
DamageTime(1.1, 2, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}

Attack()
{
Edge(2);
DamageTime(2.1, 3, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1500);
Push(20.0);
}



Transition("IDLE");
}

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

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

}
TurnFactor(1.3);

Duration(3, "Seconds");
Deflect()
{
DeflectAngle(-360, 360); // deflect anything from forward arc
EnergyCost(0.0);
}

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

Attack()
{
Edge(0);
DamageTime(0.1, 1, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}
Attack()
{
Edge(1);
DamageTime(1.1, 2, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}

Attack()
{
Edge(2);
DamageTime(2.1, 3, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1500);
Push(20.0);
}

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

Duration(3, "Seconds");
Deflect()
{
DeflectAngle(-360, 360); // deflect anything from forward arc
EnergyCost(0.0);
}
AnimatedMove()
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(0.5);
VelocityFromStrafe(0.5);
}

Attack()
{
Edge(0);
DamageTime(0.1, 1, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}
Attack()
{
Edge(1);
DamageTime(1.1, 2, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}

Attack()
{
Edge(2);
DamageTime(2.1, 3, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1500);
Push(20.0);
}
TurnFactor(0.3);

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

Transition("IDLE");
}

State("JUMPSPRING")
{
Posture("Jump");
Animation("stand_walkforward")
{
BlendInTime(0.10);
BlendOutTime(0.25);
}

Gravity(-4.0);
GravityVelocityTarget(95.0); // accelerate us
AnimatedMove()
{
VelocityFromThrust(90.0);
VelocityFromStrafe(0.0);
}
AlignedToThrust();

TurnFactor(4.3);

Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Jump");
Button("Fire", "Press");
}
}

Transition("JUMPSPRING2");
}


State("JUMPSPRING2")
{
Posture("Jump");
Animation("stand_walkforward")
{
BlendInTime(0.10);
BlendOutTime(0.25);
}

Gravity(-4.0);
GravityVelocityTarget(55.0); // accelerate us
AnimatedMove()
{
VelocityFromThrust(40.0);
VelocityFromStrafe(0.0);
}
AlignedToThrust();

TurnFactor(6.3);


Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Jump");
Button("Fire", "Press");
}
}

Transition("FALL")

}

State("FALL")
{
Posture("Jump");
Animation("stand_walkforward")
{
BlendInTime(0.10);
BlendOutTime(0.25);
}

Gravity(4.0);
GravityVelocityTarget(-15.0); // accelerate us
AnimatedMove()
{
VelocityFromThrust(90.0);
VelocityFromStrafe(0.0);
}
AlignedToThrust();

Duration(3, "Seconds");

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

Attack()
{
Edge(0);
DamageTime(0.1, 1, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}
Attack()
{
Edge(1);
DamageTime(1.1, 2, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1000);
Push(20.0);
}

Attack()
{
Edge(2);
DamageTime(2.1, 3, "Seconds");
DamageLength(5.5);
DamageWidth(1.25);
Damage(1500);
Push(20.0);
}

TurnFactor(0.3);

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

Transition("IDLE");
}
Hidden/Spoiler:
/////THE ULTIMATE CREATION, A LIVING RANCOR, by ={WGO}=Rancor, also known as MetalcoreRancor
/////Do not ever, EVER push the red button... lolz
/////
[GameObjectClass]
ClassParent = "com_inf_default"
GeometryName = "tat3_bldg_rancor.msh"
GeometryScale = 0.7
[Properties]
UnitType = "trooper"
MapTexture = "troop_icon"
MapScale = 1.4

GeometryName = "tat3_bldg_rancor"

SkeletonName = "Rancor"
AnimationName = "Rancor"
SkeletonRootScale = 1.1

HealthType = "animal"
MaxHealth = 2000.0

UseDirectionalDeaths = 0
UseDirectionalJumps = 0

CapturePosts = 1

MaxSpeed = 6.5 // base forward speed
MaxStrafeSpeed = 6.5 // base right/left speed
MaxTurnSpeed = 3.0 // base turn speed
JumpHeight = 10.5 // base jump height in meters
JumpForwardSpeedFactor = 2.3 // boost forward part of velocity by this factor when jumping
JumpStrafeSpeedFactor = 5.0 // boost side/backward part of velocity by this factor when jumping
RollSpeedFactor = 1.7 // in forward arc, boost speed by this factor when rolling
Acceleration = 90.0 // accelerate to full run in about 7/70 = 0.1 seconds
JetAcceleration = 20.0 // for characters with jet jump, use this acceleration for in air control
SprintAccelerateTime = 0.05 // accelerate from run to sprint in this time
EnergyDrainSprint = 20.0 // energy spent per second of sprinting
ControlSpeed = "sprint 4.00 0.50 0.50"

WEAPONSECTION = 1
WeaponName = "ran_weap_inf_rancorclaw"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "com_weap_inf_ForceDisaster"
WeaponAmmo = 0
WeaponChannel = 1


JumpHeight = 3.0 // base jump height in meters
RecoverFromTumble = "1"
CollisionScale = "0.0 0.0 0.0" // don't take damage from collisions
EnergyBar = 100.0 // Max energy
EnergyRestore = 10.0 // energy regained per second if moving
EnergyRestoreIdle = 30.0 // energy regained per second if not
EnergyDrainSprint = 20.0 // energy spent per second of sprinting
EnergyMinSprint = 20.0 // min energy to start sprinting
EnergyCostJump = 50.0 // energy cost to jump
EnergyCostRoll = 25.0 // energy cost to roll



CAMERASECTION = "STAND"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 5.8 0.0
TrackOffset = "0.0 0.0 3.5"
TiltValue = "5.0"

CAMERASECTION = "STANDZOOM"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 1.8 0.0
TrackOffset = "0.4 0.05 2.8"
TiltValue = "3.5"

CAMERASECTION = "CROUCH"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.0 0.15 3.5"
TiltValue = "5.0"

CAMERASECTION = "CROUCHZOOM"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"

CAMERASECTION = "PRONE"

EyePointOffset = "0.0 0.5 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.0 0.0 3.0"
TiltValue = "5.0"

CAMERASECTION = "PRONEZOOM"

EyePointOffset = "0.0 0.5 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"







NoEnterVehicles = 1

AISizeType = "SOLDIER"


VOUnitType = 174

SoldierMusic = "rancor_chew_02"
HurtSound = "roar_03"
DeathSound = "roar_03"
AcquiredTargetSound = ""
HidingSound = "gam_chatter"
ApproachingTargetSound = "gam_chatter"
FleeSound = "roar_01"
PreparingForDamageSound = "gam_hurt"
HeardEnemySound = "gam_chatter"
ShockFadeOutTime = ""
ShockFadeInTime = ""
ShockFadeOutGain = ""
ShockSound = ""
ClothingRustleSound = ""
LowHealthSound = "rancor_amb"
LowHealthThreshold = "5.0"
FoleyFXClass = "rancor_amb"

Re: A most peculiar finding, and dilemma.

Posted: Sat Feb 21, 2009 1:11 am
by Maveritchell
MetalcoreRancor wrote:If you watch this footage, you'll notice that the Rancor is doing things no jedi has done before...
:roll:
you are in "jump" and as a jedi, its not rigged for the character to fire a secondary in this condition
The way you have it set up, you're not really in a jump, it looks like, you're just in another combo state. If you're not in the "IDLE" combo state (whether or not your animation is actually idle) you can't use another attack (without leaving the state).

I don't think I've got a workaround for you, though (especially not really knowing what your end goal is besides a nebulous "fire weapons while doing this"). You could try making the state have the "jet" posture, but I don't think that'll work by itself (I would still contend that unless you are in the base "IDLE" state, you can't do anything). I would have guessed maybe to fool around with what inputs you have locked but it doesn't look like you locked any for the state.

If you want a specific workaround, it might help to say what your real end goal is (in terms of exactly what it is you want to see in your map). Without that, we'll be hard-pressed to come up with a workaround.

Re: A most peculiar finding, and dilemma.

Posted: Sat Feb 21, 2009 1:40 am
by MetalcoreRancor
Overall the idea I began with was to just make my Rancor into a nice comfortable, fun villian to play, with averageally-destructive force powers. But as usual, my experimentation got the best of me. So now what I'd like to see happen is the Rancor able to enter "flying" state and be able to shoot. I didn't try jet because I wasnt sure if it was able to handle Jet, seeing as when Dann tried to make it a jet trooper, it crashed. I'll try the Jet state, might of just been the infantry style jetting that got it to crash before.

But to correct you, no you don't have to be in Idle to do anything. Idle is just the base. There can be more then 1 base state to switch between, if my theory of chain attacks is correct, which I believe it is.

Re: A most peculiar finding, and dilemma.

Posted: Sat Feb 21, 2009 2:17 am
by Maveritchell
If you had a problem making it go into a jet state, and it crashed, it was probably animation-related and not related to the .odf parameters. I would suggest just renaming your idle_emote anim as your jet hover anim (just for testing purposes).
But to correct you, no you don't have to be in Idle to do anything. Idle is just the base. There can be more then 1 base state to switch between, if my theory of chain attacks is correct, which I believe it is.
Well I would certainly hope that you think your theories are correct.

I can't say that I've tried adding more than one base state, but it seems redundant and counter to what the docs inferred. However, if you try it and prove me wrong, more power to you. The point would still remain, however, that you really should be in a "null" state to give additional inputs.

Excepting that, you might try making your jump state break with the secondary fire (or whatever it's actually called, I know it's mixed-up) button, or you could fake an attack with an explosion and just use that as another combo state available from your jump state.

Re: A most peculiar finding, and dilemma.

Posted: Sat Feb 21, 2009 2:35 am
by MetalcoreRancor
Well, my inital test with Jet earlier (I dont have time for more now) didn't change much, but didnt crash. So I'll keep toying around, and thanks for the input so far.

I agree, the dual states idea is redundant, and why I haven't set out to prove it. But soon enough I will, because I'm trying everything out.

Edit: Update: I've found a good middle ground with this that I'm happy with. I didn't get it to fire stuff like I wanted, but I got it to attack with its claws in air, which can do explosions. Look forward to the final incarnation of this product in a future project.. Until then, you have the code and video supplied in this topic to satisfy your appetites.