Page 1 of 1

Disable lock-on control for human via lua

Posted: Sat Dec 12, 2009 1:15 am
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?

Re: disable option via lua

Posted: Sat Dec 12, 2009 5:46 am
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"

Re: disable option via lua

Posted: Sat Dec 12, 2009 5:54 am
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.

Re: disable option via lua

Posted: Sat Dec 12, 2009 10:36 am
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")

Re: disable option via lua

Posted: Sat Dec 12, 2009 12:07 pm
by DarthD.U.C.K.
the problem is that you cant do that via lua as mav said

Re: Disable option via lua

Posted: Sat Dec 12, 2009 12:52 pm
by myers73
he said i cant modify weapons, not controls

Re: Disable option via lua

Posted: Sat Dec 12, 2009 12:58 pm
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

Re: Disable lock-on control for human via lua

Posted: Sat Dec 12, 2009 1:18 pm
by Fiodis
Why not just edit the odfs to make the AI more accurate?

Re: Disable lock-on control for human via lua

Posted: Sat Dec 12, 2009 2:22 pm
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"

:?

Re: Disable lock-on control for human via lua

Posted: Sat Dec 12, 2009 5:06 pm
by DarthD.U.C.K.
this can also make the ai "better"
and its even lua coding!