PilotType = Self - Set/Select Target? [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
User avatar
yukisuna
Rebel Sergeant
Rebel Sergeant
Posts: 210
Joined: Wed Jan 28, 2009 5:50 am
Projects :: My new PC hates the Mod Tools
Games I'm Playing :: See Interests
xbox live or psn: Samura Yukisuna
Location: Stuck in a place full of happy happiness known as Steam.

PilotType = Self - Set/Select Target? [Solved]

Post by yukisuna »

To Anyone that might now this - is it possible, if i set a turret on my vehicle (in this case, a ship, i made a custom Odf for the "UT-AT" so it is now a flyer, and set ALL its 5 turrets to be automatic. now im wondering, is it possible to set them to aim for my target? basically, im wondering if i can do anything like this;

>Ship Is Fired Up, Takes Off. Turrets Idle
-
>Pilot Locks on to a target. Turrets aim for that target.
-
-
/ Turrets fire whenever they have the enemy in sight, or at all times, wheter they can see the target or not?
=
\ Turret Guns is controlled by pilot, but Turrets move individually from the ship and/or each other?

Is this possible? Im Pretty sure i can configure the turrets to be controlled by the pilot, but would i then have the ability to make them turn


/ Faster than the ship, so they doesnt allways point the same direction than the ship's nose?
=
\ Individually from the ship itself, so they can be turned backwards before the ship has turned around alot?

Alternatively

Continuing top category --> //Control ship movement, while individually controlling turrets (can point in opposite directions from each other)?
Continuing bottom category \\ Freeze Ship Turning/Yaw Movement, Keep controlling turrets?

Any Help is AppreciatedA LOT, tell me if what i said is hard to read, then i'll write it again in a different manner.

EDIT: Lua Coding has allways been what i have been doing the most when it comes to modding, so if anyone first direct me in the right direction, i think i might be able to figure my way to complete this.

I Have already figured out how to control the guns on the turrets, but it isnt exactly what i wanted.

So Far limiting their range to a very short one should work well, but if close to a capital ship, system or frigate, they tend to aim for it even outside their range.

Of course, longer range does also make a craft with 5 turrets pretty overpowered, but i have already explained what i wanted.

i think it could work great if you want to make the game resemble the movie more, since there they aim the cannons individually from the ship, and i think, being able to turn a gun individually from the ship on for example the B-Wing or Y-Wing, or the Jedi Starfighter.

of course, i did direct this topic towards the really experienced modders, or maybe i should say, Pro-grammers (Bad Pun intended :P ) like the admins, i know that for example Maveritchell might be one of the people on gametoast with the most knowledge about Lua. Im Sure that he might have a clue about this, or he might know someone that do. :) if not, im prepared to leave the project, since if the admins doesnt know anything about this, then it probably isnt worth knowing.

EDIT: Thank You For Helping Me Once Again, DarthD.U.C.K, I WIll Try Following your Suggestion :)
Last edited by yukisuna on Sun Apr 22, 2012 10:53 am, edited 2 times in total.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: PilotType = Self - Set/Select Target?

Post by Dakota »

So what you want are turrets on your ship to fire at what ever you are locked on to without actually being controlled by the pilot of the ship so that they can shoot at the target even if you aren't really aiming at it, like if it was above you or at your side?

If so, I am not sure that it is possible but if it is I think it would require a lot of LUA coding for it all to work. Since I am not all that great with setting up LUA to do functions like this I am not sure if it would be difficult, easy, or possible. Maybe someone with a higher knowledge on the subject could help.
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: PilotType = Self - Set/Select Target?

Post by DarthD.U.C.K. »

first of all: you cant manipulate turrets on a vehicle through lua.
you can only use odf to define turrets and its not possible to achieve exactly what you want.
the "locking on" is only used to steer missiles etc. you cant access the target info.
im pretty sure you can make the turrets react quicker than the ship by changing the movetension of the ship and the aimtension of the turrets. using it on a flyer would result in ugly "lagging" of the movement i think.
so basically what you can have is either a ship with multiple turrets controlled by the pilot, shooting in the middle of the screen or maybe a ship with ai controlled turrets with really limited aiming region so that they can only shoot at bojects close to the middle of the pilots screen.
if you dont know how to set one of thoe up, i wrote a large explanation on turrets here which explains all usable parameters.
Post Reply