Game crashes when I try to roll [solved]

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
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Game crashes when I try to roll [solved]

Post by MileHighGuy »

I'm working on a rancor unit. It crashes when I try to roll (press alt). The game just freezes. Nothing turns up in the error log.

I have these lines in the idle state of the combo to prevent rolling:

Posture("Stand", "!Roll");
InputLock("All", "!Fire", "!Crouch", "!Thrust");

and in the odf i have these:

EnergyBar = 0.0 // Max energy
EnergyRestore = 0.0 // energy regained per second if moving
EnergyRestoreIdle = 0.0 // energy regained per second if not

What are the .msh names for the rolling animation? I added any that contained the word dive but that did not help.

Does anyone know why this might be happening? This is the one thing preventing me from uploading it.
Last edited by MileHighGuy on Tue Aug 04, 2015 11:56 pm, edited 3 times in total.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: Game crashes when I try to roll

Post by razac920 »

Messing with the IDLE state is risky and can cause crashes. Does your rancor jump? If not, then you could remove the energy bar entirely to stop jumping and rolling:
EnergyBar = 0.0 // Max energy
EnergyRestore = 0.0 // energy regained per second if moving
EnergyRestoreIdle = 0.0 // energy regained per second if not
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Game crashes when I try to roll

Post by MileHighGuy »

:) thats exactly what i have in my post. No it does not jump.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: Game crashes when I try to roll

Post by razac920 »

Oh, i mean, only use those lines in your ODF. Make the IDLE state back to normal, and the crashes should stop.
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Game crashes when I try to roll

Post by MileHighGuy »

Yes they were only in the odf where they belong. edited the first post for clarity.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: Game crashes when I try to roll

Post by razac920 »

Did you try fixing the IDLE state?
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Game crashes when I try to roll

Post by MileHighGuy »

AFAIK there is nothing wrong with it. I have experience with combos but I could have made a mistake. here is my whole .combo
Hidden/Spoiler:
[code]OffhandAnimation("stand_useforce", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("stand_useforce", "CHARGE");

Animation("stand_grab")
{
BlendTimeIn(0.15);
BlendTimeOut(0.15);
BlendTimeTo("stand_idle_emote", 0.1);
}

State("IDLE")
{
Posture("Stand", "!Roll");
Duration(0.0); // infinite duration
EnergyRestoreRate(); // (0.0, "FromSoldier")
InputLock("All", "!Fire", "!Crouch", "!Thrust");


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


State("ATTACK1")
{
Posture("Crouch", "!Roll"");
Animation("stand_grab");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
Edge(0);
DamageTime(15, 55, "Frames");
DamageLength(1.0);
DamageWidth(2.0); //1.25
Damage(600);
Push(10.0);
}

Duration(60, "Frames");

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

Transition("IDLE");
}

[/code]
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: Game crashes when I try to roll

Post by razac920 »

Why don't you delete the Posture line from the IDLE state, change the InputLock line back to InputLock(0.15, "Sprint", "Jump", "Crouch"), and try again?
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Game crashes when I try to roll

Post by thelegend »

What about RollSpeed set to 0.0? This would remove rolling from your unit.
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Game crashes when I try to roll

Post by MileHighGuy »

razac you were right there was something wrong with the posture line! I had the posture set to only allow standing so when I tried to roll it crashed. I changed it to all and it works now. Idle state must have all postures but other states work fine with just 1.
Post Reply