Disable lock-on control for human via lua

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
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 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: Atlanta, GA xfire=myers73 IngameName=mYers

Disable lock-on control for human via lua

Post by myers73 »

1.
is there a way to disable the lockon control for the human via lua so that she/he cannot lock onto other units?
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: disable option via lua

Post by DarthD.U.C.K. »

these values define what can be locked/targeted on, the are written in the waponodf, i dont know much about lua, maybe you can change them via scripting...:

Code: Select all

TargetEnemy             = "1"
TargetNeutral           = "0"
TargetFriendly          = "0"

TargetPerson            = "1"
TargetAnimal            = "1"
TargetDroid             = "1"
TargetVehicle           = "1"
TargetBuilding          = "0"
the detpack has everything set to "0"

here are three additional values:

Code: Select all

LockOnRange             = "32.0"
LockTime                = "0.0"
AutoAimSize             = "1.5"
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: disable option via lua

Post by Maveritchell »

No; you can't modify weapons in a script. You'll have to have a separate class (with separate weapons) available for your human player.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 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: Atlanta, GA xfire=myers73 IngameName=mYers

Re: disable option via lua

Post by myers73 »

sorry that i wasnt not clear in my first post. The main goal of my mod is to make the AI better and it harder for the humans with out just making it 1000 vs 1. I am setting up some rifles like rocketlaunchers to test something. I want the AI to be able to lock on while the human not to with out making two sides for each team. I dont want to modify the gun via lua i want to disable the ability to use the control (ie the button "Q")
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: disable option via lua

Post by DarthD.U.C.K. »

the problem is that you cant do that via lua as mav said
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 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: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Disable option via lua

Post by myers73 »

he said i cant modify weapons, not controls
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: Disable option via lua

Post by DarthD.U.C.K. »

you can only disable the locking via weaponodfs

the only way to achive what you want would be making a side with all weaponodfs in it which is loaded after the nromal sides, the new weaponodfs would the override the shipped ones
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Disable lock-on control for human via lua

Post by Fiodis »

Why not just edit the odfs to make the AI more accurate?
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 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: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Disable lock-on control for human via lua

Post by myers73 »

for the
LockOnRange = "100.0"
LockTime = "0.4"
LockOnAngle = "20.0"
are there AI only ones? like
AILockOnRange = "100.0"
AILockTime = "0.4"
AILockOnAngle = "20.0"

:?
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: Disable lock-on control for human via lua

Post by DarthD.U.C.K. »

this can also make the ai "better"
and its even lua coding!
Post Reply