Still need help with an ambush and a problem with Jango anim

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
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Still need help with an ambush and a problem with Jango anim

Post by Commander_Fett »

Well, thanks to a genorous amount of help and patience from RepSharpshooter, I now have a working ambush, sort of. The AI now spawn (yipee!), but only seven spawn for some reason, and instead of attacking the player, they just stand absolutely still. My LUA refering to the side:
Hidden/Spoiler:
ScriptCB_DoFile("MultiObjectiveContainer")
ScriptCB_DoFile("ObjectiveAssault")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("ObjectiveGoto")
ScriptCB_DoFile("ObjectiveCTF")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("Ambush")
ScriptCB_DoFile("setup_teams")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
AmbushTeam = 3
atm = AmbushTeam
________________________________________________________________________________
--objective: kill the ambushing cis
ambushers = TargetType:New{classname = "amb_inf_marine", killLimit = 8, icon = "hud_objective_icon_circle"}
Objective2= ObjectiveAssault:New{teamATT = ATT, teamDEF = amb,
text = "level.mad.campaign.2", popupText = "level.mad.campaign.2_popup"}
Objective2:AddTarget(ambushers)


Objective2.OnStart = function(self)
-- SetupAmbushTrigger("ambush_trigger_1", "ambush_path_1", 8, atm)
Ambush("ambush_path_1", 8, atm)
end

Objective2.OnComplete = function(self)
end
_____________________________________________________________________________
ReadDataFile("dc:SIDE\\atm.lvl",
"amb_inf_marine")
_____________________________________________________________________________
atm = {
team = atm,
units = 8,
reinforcements = -1,
soldier = { "amb_inf_marine",8, 8},
}
}

SetTeamAsEnemy(ATT, atm)
SetTeamAsEnemy(atm, ATT)
SetTeamAsEnemy(ATT, DEF)
SetTeamAsEnemy(DEF, ATT)
SetTeamAsFriend(atm, DEF)
SetTeamAsFriend(DEF, atm)
I've checked in ZE, there are 8 nodes on the path, but only 7 AI spawn. Can someone help?

EDIT: Also, I downloaded DarthD.U.C.K.'s dual pistol anims, and I got them working, but whenever you're not moving, jango stands up perfectly straight. This looks kinda wierd, is there a way to fix this?
What I did: I copied Jangos basepose and DarthD.U.C.K.'s pistol anims to an animationbank folder, renamed the "pistols" in the anims names to "pistol", and munged it to my side. do I need anything else to stop him from looking like a statue?
Like this:
Hidden/Spoiler:
Image
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: Still need help with an ambush and a problem with Jango anim

Post by DarthD.U.C.K. »

hmm, try to remove the _full at the end of the unmunged anims mesh, if he still stands like this try to add _upper
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Still need help with an ambush and a problem with Jango anim

Post by Commander_Fett »

Okay, I removed the idle anim and it worked fine. But can anyone answer my previous question?

And a question about weapons. I know this line

Code: Select all

InitialSalvoDelay = "0.46" // 14 frames
controls how fast the weapon fires, but is there any way to change how fast it fires after the first shot? I tried

Code: Select all

SalvoDelay          = "0.0"
SalvoTime           = "0.0"
but it does nothing.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Still need help with an ambush and a problem with Jango anim

Post by Maveritchell »

Should be a "ShotDelay" line. Look through the ODF parameters doc or just reference some stock .odfs.
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Still need help with an ambush and a problem with Jango anim

Post by Commander_Fett »

ShotDelay = "0.0"
I tried that, it didn't work.
here's the odf sectionss about it:
Hidden/Spoiler:
InitialSalvoDelay = "0.46" // 14 frames
RoundsPerClip = "60"
ReloadTime = "0.0"
ShotDelay = "0.0"
TriggerSingle = "0"

SalvoCount = "1"
SalvoDelay = "0.0"
SalvoTime = "0.0"

HeatPerShot = "0.0"
HeatRecoverRate = "0.0"
HeatThreshold = "0.0"


OffhandWeapon = 1
Note: this is the anims foir the wristrocket, so InitialSalvoDelay = "0.46" // 14 frames
has to be there for it to work.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Still need help with an ambush and a problem with Jango anim

Post by Maveritchell »

You've got to try and experiment, there's no way everyone can spoonfeed every little test you can run on .odf parameters.

Regardless, ShotDelay will work, I suggest you try setting it to something besides 0.0. (If you just think about the mechanics of zero shot delay it should be apparent why this won't work.)
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: Still need help with an ambush and a problem with Jango anim

Post by DarthD.U.C.K. »

did you try to remove the _full from the idle?
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Still need help with an ambush and a problem with Jango anim

Post by Commander_Fett »

@Maveritchell: I tried .1 and .05 earlier, and those didn't work either. I used the code from a working flamethrower of mine (except forthe InitialSalvoDelay = line), I just added it to my odf, commented out the old stuff, and removed the InitialSalvoDelay = line from the new one.

@DarthD.U.C.K.: No, though I might try that.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Still need help with an ambush and a problem with Jango anim

Post by Maveritchell »

Try cleaning. That is the line that does it, unless I'm just misinterpreting what you want done.
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Still need help with an ambush and a problem with Jango anim

Post by Commander_Fett »

No luck after a clean. I can make it fire contiuously by deleting InitialSalvoDelay = 0.46, but then the anim doesn't play. If I don't delete it, the anim plays, but it only fires a shot every 0.46 seconds.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Still need help with an ambush and a problem with Jango anim

Post by Maveritchell »

Are you talking about animations or shot mechanics? You started off asking about how to get a shot to fire at a certain speed.
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Still need help with an ambush and a problem with Jango anim

Post by Commander_Fett »

Well, I wanted to be able to fire at a certain speed with it still playing the wristrocket anim.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Still need help with an ambush and a problem with Jango anim

Post by Maveritchell »

Add in the line "DisplayRefire = 1"
Post Reply