Can Flyers(like LA-AT's) fly alone?

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

CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

Hey me again :)
Is it possible to let LA-AT's fly alone when all passsenger slots are full?
MY Idea: You start at a Venator, enter the LA-AT and when its full, it starts... Fly to the planet an Land, then it only a prop. Venator Commandpost dissapear, and only at the Landingzones are CP's. But without a Pilot.(if neccsesary its ok when a pilot is there)
Possible or not?
Thanks in advice!
User avatar
poop
Private
Posts: 44
Joined: Wed Sep 22, 2010 5:07 pm
Projects :: Code Zero
Location: Wynfield Circle

Re: can Flyers(like LA-AT's) fly alone?

Post by poop »

CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

No, not really, this sint wat i mean... with Flyersplines I cannot say they have to land there.
Darth D.U.C.K told me, i have to use turrets, because the playermodel cannot enter a prop.
But Thank you for help.
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: can Flyers(like LA-AT's) fly alone?

Post by Eggman »

CT-26-6958_Hevy wrote:No, not really, this sint wat i mean... with Flyersplines I cannot say they have to land there.
Darth D.U.C.K told me, i have to use turrets, because the playermodel cannot enter a prop.
But Thank you for help.
Correct. You set the gunship up as a turret, place it in ZE, and use ZE's animation mode to set it along whatever flight path you want (if you aren't familiar with how to do this, read through the procedural animation doc that came with the mod tools).
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

Can i say, the Anim have to start after (for example) 1 minute and not directly when starting the map?
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: can Flyers(like LA-AT's) fly alone?

Post by Darth_Spiderpig »

CT-26-6958_Hevy wrote:Can i say, the Anim have to start after (for example) 1 minute and not directly when starting the map?
You can, just need to be careful with the timing.
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

Got it...
Maybe i can Force all Units in LA-AT's till they filled up, and the rest spawn at the ground(when the laats landed)?
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: can Flyers(like LA-AT's) fly alone?

Post by Eggman »

Darth_Spiderpig wrote:
CT-26-6958_Hevy wrote:Can i say, the Anim have to start after (for example) 1 minute and not directly when starting the map?
You can, just need to be careful with the timing.
When you set up the animation in ZE, there will be a tab that, when selected, has the animation play as soon as the mission starts. If unselected, you can use the awesome power of .lua scripting to tell the animation when to start (also explained in the docs - you can tie an animation to any variety of events that tell it when to start, stop, rewind, and so on).
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

I followed Java_Killers tutorial, but it doesnt work.
in ZeroEditor all wokred, i've seen my animation, but ingame my laat just stand in the air and do nothing...

My LAAT odf:
Hidden/Spoiler:
[code][GameObjectClass]
ClassLabel = "armedbuilding"
GeometryName = "rep_la_at_gunship.msh"

[Properties]
FLYERSECTION = "BODY"

VehicleType = "transport"
MapTexture = "gunship_icon"
HealthTexture = "HUD_rep_gunship_icon"
MapScale = 2.0

GeometryName = "rep_la_at_gunship"

CollisionScale = "2.5"
CollisionThreshold = "5.0"

CollisionInflict = "0.1"

MaxHealth = 10000.0




//*****************************
////////////////////////////////
BUILDINGSECTION = "TURRET1"
////////////////////////////////
//PassengerSlots = "1"
//PassengerEyePoint = "hp_passenger1"

ForceMode = 1
ThirdPersonFOV = 59.5
PitchRate = 0.8
PitchFilter = 2.75
TurnRate = 1.3
TurnFilter = 2.75

YawLimits = "-95 -60"
PitchLimits = "-10.0 20.0"

PCPitchTurnFactor = "20.0"
PCYawTurnFactor = "20.0"

PitchTurnFactor = "1.0"
YawTurnFactor = "1.0"

EyePointOffset = "0.0 10.0 -3.0"
MountPos = "1.5 -0.75 1.75"
TrackCenter = "0.0 0.0 0.0"
TrackOffset = "0.0 0.0 0.0"

//ControlsUnit = "1"
PilotPosition = "hp_passenger1"
PilotPositionAttachOffset = "0.0 0.0 1.0"
PilotAnimation = "standing"

VehiclePosition = "common.vehiclepositions.passenger"

///////////////////////////////////////////////////////////////

//*****************************
////////////////////////////////
BUILDINGSECTION = "TURRET2"
////////////////////////////////
//PassengerSlots = "2"
//PassengerEyePoint = "hp_passenger1"

ForceMode = 1
ThirdPersonFOV = 59.5
PitchRate = 0.8
PitchFilter = 2.75
TurnRate = 1.3
TurnFilter = 2.75

YawLimits = "-95 -60"
PitchLimits = "-10.0 20.0"

PCPitchTurnFactor = "20.0"
PCYawTurnFactor = "20.0"

PitchTurnFactor = "1.0"
YawTurnFactor = "1.0"

EyePointOffset = "0.0 10.0 -3.0"
MountPos = "3 -0.75 1.75"
TrackCenter = "0.0 0.0 0.0"
TrackOffset = "0.0 0.0 0.0"

//ControlsUnit = "1"
PilotPosition = "hp_passenger1"
PilotPositionAttachOffset = "0.0 0.0 -1.0"
PilotAnimation = "standing"

VehiclePosition = "common.vehiclepositions.passenger"

////////////////////////////////
BUILDINGSECTION = "TURRET3"
////////////////////////////////
//PassengerSlots = "3"
//PassengerEyePoint = "hp_passenger1"

ForceMode = 1
ThirdPersonFOV = 59.5
PitchRate = 0.8
PitchFilter = 2.75
TurnRate = 1.3
TurnFilter = 2.75

YawLimits = "-95 -60"
PitchLimits = "-10.0 20.0"

PCPitchTurnFactor = "20.0"
PCYawTurnFactor = "20.0"

PitchTurnFactor = "1.0"
YawTurnFactor = "1.0"

EyePointOffset = "0.0 10.0 -3.0"
MountPos = "4.5 -0.75 1.75"
TrackCenter = "0.0 0.0 0.0"
TrackOffset = "0.0 0.0 0.0"

//ControlsUnit = "1"
PilotPosition = "hp_passenger1"
PilotPositionAttachOffset = "5.0 5.0 3.0"
PilotAnimation = "standing"

VehiclePosition = "common.vehiclepositions.passenger"

////////////////////////////////
BUILDINGSECTION = "TURRET4"
////////////////////////////////
//PassengerSlots = "4"
//PassengerEyePoint = "hp_passenger1"

ForceMode = 1
ThirdPersonFOV = 59.5
PitchRate = 0.8
PitchFilter = 2.75
TurnRate = 1.3
TurnFilter = 2.75

YawLimits = "-95 -60"
PitchLimits = "-10.0 20.0"

PCPitchTurnFactor = "20.0"
PCYawTurnFactor = "20.0"

PitchTurnFactor = "1.0"
YawTurnFactor = "1.0"

EyePointOffset = "0.0 10.0 -3.0"
MountPos = "4.5 -0.75 1.75"
TrackCenter = "0.0 0.0 0.0"
TrackOffset = "0.0 0.0 0.0"

//ControlsUnit = "1"
PilotPosition = "hp_passenger1"
PilotPositionAttachOffset = "20.0 10.0 30.0"
PilotAnimation = "standing"

VehiclePosition = "common.vehiclepositions.passenger"

////////////////////////////////
BUILDINGSECTION = "TURRET5"
////////////////////////////////
//PassengerSlots = "5"
//PassengerEyePoint = "hp_passenger1"

ForceMode = 1
ThirdPersonFOV = 59.5
PitchRate = 0.8
PitchFilter = 2.75
TurnRate = 1.3
TurnFilter = 2.75

YawLimits = "-95 -60"
PitchLimits = "-10.0 20.0"

PCPitchTurnFactor = "20.0"
PCYawTurnFactor = "20.0"

PitchTurnFactor = "1.0"
YawTurnFactor = "1.0"

EyePointOffset = "0.0 10.0 -3.0"
MountPos = "4.5 -0.75 1.75"
TrackCenter = "0.0 0.0 0.0"
TrackOffset = "0.0 0.0 0.0"

//ControlsUnit = "1"
PilotPosition = "hp_passenger1"
PilotPositionAttachOffset = "5.0 5.0 3.0"
PilotAnimation = "standing"

VehiclePosition = "common.vehiclepositions.passenger"


///////////////////////////////////////////////////////////////


[/code]
And a screen of my animationoptions in Zeroeditor:
Hidden/Spoiler:
Image
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: can Flyers(like LA-AT's) fly alone?

Post by Darth_Spiderpig »

Have you saved your animations in ZE?

Like the tab above the group settings? (top right)
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

Yes, After klicked on Save Anim, a new Window appears:"Your ANM.... "
Do i have to do something after that? I munged and started teh testmap.
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: can Flyers(like LA-AT's) fly alone?

Post by Darth_Spiderpig »

You saved your map too? :P
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

Yes sure... i opened my map over and over again, checked saved and munged again...
Really no other idea?
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Re: can Flyers(like LA-AT's) fly alone?

Post by jangoisbaddest »

Since you want the animation to be specifically timed, and since the play when level begins option doesn't seem to be working for you, I'd go with using the LUA to start your animation. Use this function in an OnTimerElapse callback (or on level start if you like):

PlayAnimationFromTo(“Animation Group Name”, beginTime, endTime)

There are many animation functions, but I recommend this one because it is very straightforward and it takes care of everything with one line of code. Much more info about how to use the LUA to manipulate your ZE animations can be found in:

procedural animation mode.doc

in your documentation folder.

EDIT: I see that the run time on your animation is 5. When you select "play when level begins", it doesn't wait for you to spawn. So the issue here is likely that you can't spawn and locate the object in question before the animation plays out, and you are merely seeing it in its final position. Try looping before messing with the LUA.
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

jangoisbaddest wrote: EDIT: I see that the run time on your animation is 5. When you select "play when level begins", it doesn't wait for you to spawn. So the issue here is likely that you can't spawn and locate the object in question before the animation plays out, and you are merely seeing it in its final position. Try looping before messing with the LUA.
At the moment it is only a test^^

I will try the Code... but the i have to disable the start at mapbeginn, right?
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: Can Flyers(like LA-AT's) fly alone?

Post by DarthD.U.C.K. »

yes, as eggman said in his second post
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: Can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

Yes, I forgot it ^^

EDIT
Sry for doublepost!

Now i have this line:

PlayAnimationFromTo(“laatland”, 10, 15)

But where i have to write it in my lua?

Double posting is against the RULES, please EDIT your post instead -Staff
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Can Flyers(like LA-AT's) fly alone?

Post by AQT »

Try putting it somewhere before:

Code: Select all

end
function ScriptInit()
CT-26-6958_Hevy
Rebel Sergeant
Rebel Sergeant
Posts: 193
Joined: Sat Jul 10, 2010 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Behind enemy lines

Re: Can Flyers(like LA-AT's) fly alone?

Post by CT-26-6958_Hevy »

i doesnt work.
my Mungelog:
Hidden/Spoiler:
[code]C:\BF2_ModTools\data_TST\_BUILD\..\..\ToolsFL\Bin\luac.exe: ..\..\common\scripts\TST\TSTt_con.lua:44: unexpected symbol near `“'
ERROR[scriptmunge scripts\TST\TSTt_con.lua]:Could not read input file.ERROR[scriptmunge scripts\TST\TSTt_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\TSTt_con.req]:Expecting bracket, but none was found.
File : munged\pc\tstt_con.script.req(1)...

ucft <--
ERROR[levelpack mission\TSTt_con.req]:Expecting bracket, but none was found.
File : munged\pc\tstt_con.script.req(1)...

ucft <--

2 Errors 0 Warnings

ERROR[levelpack shell.req]:Input file shell.req does not exist. [continuing]
1 Errors 0 Warnings[/code]
and my .lua
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)

conquest:Start()

EnableSPHeroRules()

PlayAnimationFromTo(“laatland”, 10, 15)

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()

ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")[/code]
is this enough from my lua?
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Can Flyers(like LA-AT's) fly alone?

Post by Darth_Spiderpig »

Munge Log wrote:C:\BF2_ModTools\data_TST\_BUILD\..\..\ToolsFL\Bin\luac.exe: ..\..\common\scripts\TST\TSTt_con.lua:44: unexpected symbol near `“'
Seems like the code is wrong somehow.
Post Reply