Author Topic: teamOnVehicle setup  (Read 753 times)

Offline batistadk

  • Jr. Member
  • **
  • Posts: 112
  • SP/COOP junkie
    • View Profile
teamOnVehicle setup
« on: 24-07-2020, 21:07:47 »
I've been playing around with some vehicles setups on multiple maps. I've been wondering about those vehicles that can be used by both teams, namely light vehicles, trucks, APC's and such. On COOP, it can be quite bothering those bots using vehicles they are not meant to, and sometimes I got surprised being shot by a SdKfz 251 full of British soldiers... :P

Of course I can use the aforementioned command to make a vehicle locked for the other team, but there is a way to make it global to all maps, altering the vehicle setup, or I need to modify each object map by map?

Thanks in advance!

batistadk

Offline Stubbfan

  • Developer
  • ******
  • Posts: 523
    • View Profile
Re: teamOnVehicle setup
« Reply #1 on: 28-07-2020, 15:07:36 »
There's no global way to do it (afaik), it's set per vehicle in each map.

You also need to add ObjectTemplate.dontClearTeamOnExit 1 to all of the PCO's (seats) on each vehicle. Otherwise the vehicle will turn grey whenever someone leaves it. And if the opposite team gets in it, the map will crash. This can be done in tmp.con for example. Note that this will likely fuck up things if you wanna play the map online later. Could be possible to add this in the actual gameplayobjects.con, but haven't tested.

Example code (this is for one vehicle):
ObjectTemplate.activeSafe PlayerControlObject sdkfz251_1
ObjectTemplate.dontClearTeamOnExit 1

ObjectTemplate.activeSafe PlayerControlObject sdkfz251_1_FrontMG
ObjectTemplate.dontClearTeamOnExit 1

ObjectTemplate.activeSafe PlayerControlObject sdkfz251_1_RearMG
ObjectTemplate.dontClearTeamOnExit 1

ObjectTemplate.activeSafe PlayerControlObject sdkfz251_1_Codriver
ObjectTemplate.dontClearTeamOnExit 1

ObjectTemplate.activeSafe PlayerControlObject sdkfz251_1_Passenger1
ObjectTemplate.dontClearTeamOnExit 1

ObjectTemplate.activeSafe PlayerControlObject sdkfz251_1_Passenger2
ObjectTemplate.dontClearTeamOnExit 1

Offline batistadk

  • Jr. Member
  • **
  • Posts: 112
  • SP/COOP junkie
    • View Profile
Re: teamOnVehicle setup
« Reply #2 on: 29-07-2020, 00:07:51 »
I see. That's a lot of work; probably I need to exercise some patience on the Notepad.

Thanks for your answer and tips! Best regards,

batistadk