Jump to content
Official BF Editor Forums
SERPIKO

How To Prevent Engineer Bots From Repairing Enemy Vehicles

Recommended Posts

My mod is almost complete but I can’t figure out how to resolve the following issue.

In order to prevent each team from accessing the opposite team vehicles, I included the “teamonvehicle 1” line in “Gameplayobjects” files and modified vehicles tweak so to include the “dontClearTeamOnExit” line (to prevent crash, as explained in a few threads here..).

Everything works fine until engineer bots ruin it all: if a vehicle gets damaged, they proudly draw their wrench and start repairing it, no matter what team the vehicle belongs to. I also saw bots beeing killed in a heroic attempt to repair the opposite team vehicle :-)

Is there a way to make engineer bots ignore enemy vehicles and only repair their team ones? I hope somone from the modding community could help me..

Share this post


Link to post
Share on other sites

Hi all,

is this forum still alive?

I can't believe that there is no "Senior" modder here capable to give a few suggestions..

At least, I would like to understand if what I aim to is just impossible. In that case, I would rather get rid of the wrench tool in my mod.

Thanks in advance to all members willing to help.

Edited by SERPIKO

Share this post


Link to post
Share on other sites

Thanks Devilman,

I read some of your posts in the past and am happy to see that such a modding community authority takes the time to try to help me..

You can find here below one of the GPO files where I had the issue.. Though I tried with different setups with no results.

rem ********** Object Spawner **********
rem [ObjectSpawnerTemplate: CP_TV_car2]
ObjectTemplate.create ObjectSpawner CP_TV_car2
ObjectTemplate.activeSafe ObjectSpawner CP_TV_car2
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 jep_nanjing
ObjectTemplate.setObjectTemplate 2 jep_vodnik
ObjectTemplate.minSpawnDelay 300
ObjectTemplate.maxSpawnDelay 400
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.teamOnVehicle 1

rem [ObjectSpawnerTemplate: CP_DISCO_car]
ObjectTemplate.create ObjectSpawner CP_DISCO_car
ObjectTemplate.activeSafe ObjectSpawner CP_DISCO_car
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 jep_nanjing
ObjectTemplate.setObjectTemplate 2 jep_vodnik
ObjectTemplate.minSpawnDelay 300
ObjectTemplate.maxSpawnDelay 400
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.teamOnVehicle 1

rem [ObjectSpawnerTemplate: CP_TV_eli]
ObjectTemplate.create ObjectSpawner CP_TV_eli
ObjectTemplate.activeSafe ObjectSpawner CP_TV_eli
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 che_wz11
ObjectTemplate.setObjectTemplate 2 che_wz11
ObjectTemplate.minSpawnDelay 300
ObjectTemplate.maxSpawnDelay 400
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.teamOnVehicle 1

rem [ObjectSpawnerTemplate: CP_TV_mitra]
ObjectTemplate.create ObjectSpawner CP_TV_mitra
ObjectTemplate.activeSafe ObjectSpawner CP_TV_mitra
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 us_bipod
ObjectTemplate.setObjectTemplate 2 us_bipod

rem [ObjectSpawnerTemplate: CP_TV_mitra2]
ObjectTemplate.create ObjectSpawner CP_TV_mitra2
ObjectTemplate.activeSafe ObjectSpawner CP_TV_mitra2
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 us_bipod
ObjectTemplate.setObjectTemplate 2 us_bipod

if v_arg1 == host

  rem [ObjectSpawner: CP_TV_car2]
  Object.create CP_TV_car2
  Object.absolutePosition -491.321/84.302/-363.072
  Object.rotation 180.000/0.000/0.000
  Object.setControlPointId 1
  Object.layer 1

  rem [ObjectSpawner: CP_DISCO_car]
  Object.create CP_DISCO_car
  Object.absolutePosition -390.184/79.198/-212.166
  Object.rotation 90.000/0.000/0.000
  Object.setControlPointId 3
  Object.layer 1

  rem [ObjectSpawner: CP_TV_eli]
  Object.create CP_TV_eli
  Object.absolutePosition -503.394/117.200/-344.984
  Object.rotation -24.700/0.000/0.000
  Object.setControlPointId 1
  Object.layer 1

  rem [ObjectSpawner: CP_TV_mitra]
  Object.create CP_TV_mitra
  Object.absolutePosition -492.601/92.256/-331.275
  Object.rotation 0.000/0.000/0.000
  Object.setControlPointId 1
  Object.layer 1

  rem [ObjectSpawner: CP_TV_mitra2]
  Object.create CP_TV_mitra2
  Object.absolutePosition -477.784/85.750/-388.536
  Object.rotation 45.000/0.000/0.000
  Object.setControlPointId 1
  Object.layer 1

endIf

rem ********** Spawn Points **********
rem [spawnPointTemplate: CP_TV_2]
ObjectTemplate.create SpawnPoint CP_TV_2
ObjectTemplate.activeSafe SpawnPoint CP_TV_2
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 1

rem [spawnPoint: CP_TV_2]
Object.create CP_TV_2
Object.absolutePosition -482.096/84.700/-391.965
Object.rotation 3.600/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_TV_3]
ObjectTemplate.create SpawnPoint CP_TV_3
ObjectTemplate.activeSafe SpawnPoint CP_TV_3
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 1

rem [spawnPoint: CP_TV_3]
Object.create CP_TV_3
Object.absolutePosition -480.557/115.820/-351.197
Object.rotation 98.053/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_TV_4]
ObjectTemplate.create SpawnPoint CP_TV_4
ObjectTemplate.activeSafe SpawnPoint CP_TV_4
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 1

rem [spawnPoint: CP_TV_4]
Object.create CP_TV_4
Object.absolutePosition -502.939/84.302/-355.073
Object.rotation 115.894/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_DISCO_1]
ObjectTemplate.create SpawnPoint CP_DISCO_1
ObjectTemplate.activeSafe SpawnPoint CP_DISCO_1
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 3

rem [spawnPoint: CP_DISCO_1]
Object.create CP_DISCO_1
Object.absolutePosition -375.395/79.150/-215.771
Object.rotation -49.200/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_DISCO_2]
ObjectTemplate.create SpawnPoint CP_DISCO_2
ObjectTemplate.activeSafe SpawnPoint CP_DISCO_2
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 3

rem [spawnPoint: CP_DISCO_2]
Object.create CP_DISCO_2
Object.absolutePosition -393.392/79.231/-226.324
Object.rotation -13.580/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_DISCO_3]
ObjectTemplate.create SpawnPoint CP_DISCO_3
ObjectTemplate.activeSafe SpawnPoint CP_DISCO_3
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 3

rem [spawnPoint: CP_DISCO_3]
Object.create CP_DISCO_3
Object.absolutePosition -329.169/79.300/-180.049
Object.rotation -100.500/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_DISCO_4]
ObjectTemplate.create SpawnPoint CP_DISCO_4
ObjectTemplate.activeSafe SpawnPoint CP_DISCO_4
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 3

rem [spawnPoint: CP_DISCO_4]
Object.create CP_DISCO_4
Object.absolutePosition -381.832/79.198/-129.923
Object.rotation 170.217/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_TV_1]
ObjectTemplate.create SpawnPoint CP_TV_1
ObjectTemplate.activeSafe SpawnPoint CP_TV_1
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 1

rem [spawnPoint: CP_TV_1]
Object.create CP_TV_1
Object.absolutePosition -416.601/79.198/-337.251
Object.rotation -100.032/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_TV_5]
ObjectTemplate.create SpawnPoint CP_TV_5
ObjectTemplate.activeSafe SpawnPoint CP_TV_5
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 1

rem [spawnPoint: CP_TV_5]
Object.create CP_TV_5
Object.absolutePosition -421.380/81.917/-311.490
Object.rotation -105.700/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_TV_6]
ObjectTemplate.create SpawnPoint CP_TV_6
ObjectTemplate.activeSafe SpawnPoint CP_TV_6
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 1

rem [spawnPoint: CP_TV_6]
Object.create CP_TV_6
Object.absolutePosition -490.637/85.300/-355.759
Object.rotation -38.500/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_DISCO_5]
ObjectTemplate.create SpawnPoint CP_DISCO_5
ObjectTemplate.activeSafe SpawnPoint CP_DISCO_5
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 3

rem [spawnPoint: CP_DISCO_5]
Object.create CP_DISCO_5
Object.absolutePosition -362.682/79.198/-227.710
Object.rotation -48.392/0.000/0.000
Object.layer 1

rem [spawnPointTemplate: CP_DISCO_6]
ObjectTemplate.create SpawnPoint CP_DISCO_6
ObjectTemplate.activeSafe SpawnPoint CP_DISCO_6
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.setSpawnPositionOffset 0/1.25/0
ObjectTemplate.setControlPointId 3

rem [spawnPoint: CP_DISCO_6]
Object.create CP_DISCO_6
Object.absolutePosition -314.647/79.283/-132.810
Object.rotation -124.900/0.000/0.000
Object.layer 1

rem ********** Control Points **********
rem [ControlPointTemplate: CP_TV]
ObjectTemplate.create ControlPoint CP_TV
ObjectTemplate.activeSafe ControlPoint CP_TV
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.setNetworkableInfo ControlPointInfo
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.setControlPointName CP_TV
ObjectTemplate.radius 7
ObjectTemplate.team 2
ObjectTemplate.controlPointId 1
ObjectTemplate.timeToGetControl 30
ObjectTemplate.timeToLoseControl 30
ObjectTemplate.minNrToTakeControl 3
ObjectTemplate.hoistMinMax 0.2/0.9

rem [ControlPointTemplate: CP_DISCO]
ObjectTemplate.create ControlPoint CP_DISCO
ObjectTemplate.activeSafe ControlPoint CP_DISCO
ObjectTemplate.modifiedByUser "Federico"
ObjectTemplate.setNetworkableInfo ControlPointInfo
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.setControlPointName CP_DISCO
ObjectTemplate.radius 15
ObjectTemplate.team 1
ObjectTemplate.controlPointId 3
ObjectTemplate.timeToGetControl 30
ObjectTemplate.timeToLoseControl 30
ObjectTemplate.minNrToTakeControl 3
ObjectTemplate.hoistMinMax 0.2/0.9

if v_arg1 == host

  rem [ControlPoint: CP_TV]
  Object.create CP_TV
  Object.absolutePosition -497.097/91.693/-334.013
  Object.layer 1

  rem [ControlPoint: CP_DISCO]
  Object.create CP_DISCO
  Object.absolutePosition -401.354/79.198/-193.365
  Object.layer 1

endIf


CombatAreaManager.use 0
rem ****** CombatAreaManager.timeAllowedOutside 10.000000


Share this post


Link to post
Share on other sites

i have never tinkered with team vehicles

but it looks like, by having both teams vehicles listed in the same spawner,with the ObjectTemplate.teamOnVehicle 1 code

may be contributing to the problem

try giving each team its own spawn paragraph

so it looks like this for the first spawner in your posted GPO

rem [ObjectSpawnerTemplate: CP_TV_car2]

ObjectTemplate.create ObjectSpawner CP_TV_car2

ObjectTemplate.activeSafe ObjectSpawner CP_TV_car2

ObjectTemplate.modifiedByUser "Federico"

ObjectTemplate.isNotSaveable 1

ObjectTemplate.hasMobilePhysics 0

ObjectTemplate.setObjectTemplate 1 jep_nanjing

ObjectTemplate.minSpawnDelay 300

ObjectTemplate.maxSpawnDelay 400

ObjectTemplate.maxNrOfObjectSpawned 1

ObjectTemplate.team 1

ObjectTemplate.teamOnVehicle 1

rem [ObjectSpawnerTemplate: CP_TV_car2a]

ObjectTemplate.create ObjectSpawner CP_TV_car2a

ObjectTemplate.activeSafe ObjectSpawner CP_TV_car2a

ObjectTemplate.modifiedByUser "Federico"

ObjectTemplate.isNotSaveable 1

ObjectTemplate.hasMobilePhysics 0

ObjectTemplate.setObjectTemplate 2 jep_vodnik

ObjectTemplate.minSpawnDelay 300

ObjectTemplate.maxSpawnDelay 400

ObjectTemplate.maxNrOfObjectSpawned 1

ObjectTemplate.team 2

ObjectTemplate.teamOnVehicle 1

rem [ObjectSpawner: CP_TV_car2]

Object.create CP_TV_car2

Object.absolutePosition -491.321/84.302/-363.072

Object.rotation 180.000/0.000/0.000

Object.setControlPointId 1

Object.layer 1

rem [ObjectSpawner: CP_TV_car2a]

Object.create CP_TV_car2a

Object.absolutePosition -491.321/84.302/-363.072

Object.rotation 180.000/0.000/0.000

Object.setControlPointId 1

Object.layer 1

The ObjectTemplate.team 1 and ObjectTemplate.team 2,may or may not be needed,when doing it the above way

good luck :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×