HELP! How can I make the AI (soldiers, snipers etc) shot from far far distances?

Started by Gui de Machaut, December 14, 2017, 06:38:06 PM

Previous topic - Next topic
Hi, my friends!

I have a problem: how can I make the AI (soldiers, snipers etc) shot from far far distances?
(or how can I increase the shot distance of the AI soldiers?)
I changed the codes of weapon's ODFs, but this did not work (its a rifle, not a sniper rifle):

MinRange        = "0"
OptimalRange    = "1000"
MaxRange        = "1200"

LockOnRange     = "1100.0"
LockTime        = "0.4"
LockOnAngle     = "1.0"

Please, someone help me (and sorry for the terrible english).

If you want to change the behaviour of the class itself, try to put this line in your unit odf at "properties":

[Properties]
UnitType            = "Scout"

then you have to put those values in your weapon's odf:

MinRange            = "8"
OptimalRange        = "64"
MaxRange            = "128"
AIUseBubbleCircle   = "1"
AIBubbleSizeMultiplier   = "0.6"

LockOnRange         = "0.0"
LockTime            = "0.0"
LockOnAngle         = "1.0"
"Come on, you apes! Do you wanna live forever?"
- Lieutenant Rasczak speaking to the Roughnecks troopers

In SWBF1 at least, I believe there is a limit - no matter how high you set the max range, the AI will not detect you at a certain point.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

What i2bros posted is correct except that Scout part. Changing the class type to scout will encourage the units to sit and lay down instead of battling.
Never let a person named AnthonyBF2 touch your BF2.

Quote from: Anthony_b on December 15, 2017, 10:46:40 AM
What i2bros posted is correct except that Scout part. Changing the class type to scout will encourage the units to sit and lay down instead of battling.
I know, I suggested it cause I thought he wanted to make a sniper class. Pardon
"Come on, you apes! Do you wanna live forever?"
- Lieutenant Rasczak speaking to the Roughnecks troopers

Quote from: i2Bros on December 15, 2017, 01:26:51 AM
If you want to change the behaviour of the class itself, try to put this line in your unit odf at "properties":

[Properties]
UnitType            = "Scout"

then you have to put those values in your weapon's odf:

MinRange            = "8"
OptimalRange        = "64"
MaxRange            = "128"
AIUseBubbleCircle   = "1"
AIBubbleSizeMultiplier   = "0.6"

LockOnRange         = "0.0"
LockTime            = "0.0"
LockOnAngle         = "1.0"


Oh, thank you so much, I2Bros! I followed your suggestion and works fine!

I have more two questions: what is "AIUseBubbleCircle = 1" and "AIBubbleSizeMultiplier = 0.6"?
How this thing works?

Can I improve AI by putting and setting the "scanning range" and the "transmit range" in other unit's ODF (like the officers)?
For exemple:

"[GameObjectClass]
ClassParent         = "rep_inf_default"

[Properties]

MaxHealth           = 100.0
MaxSpeed            = 7.0       // base forward speed

ScanningRange          = 150.0
TransmitRange          = 75.0

WEAPONSECTION = 1
WeaponName         = "rep_weap_inf_DC-15AR_Rifle"
WeaponAmmo         = 4

WEAPONSECTION = 2
WeaponName         = "rep_weap_inf_thermaldetonator"
WeaponAmmo         = 4
WeaponChannel      = 1

WEAPONSECTION = 3
WeaponName         = "rep_weap_award_rifle"
WeaponAmmo         = 4


VOUnitType           = 121"