Stop units driving vehicles?

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
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Stop units driving vehicles?

Post by SkinnyODST »

I want to make the Super Battle Droid unable to get in vehicles and turrets, how would I do that?
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Stop units driving vehicles?

Post by AnthonyBF2 »

Put the following line of code anywhere in your map script after ScriptPostLoad

Code: Select all

SetClassProperty("cis_inf_rifleman", "NoEnterVehicles", "1")
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Stop units driving vehicles?

Post by Teancum »

Does that affect the player? Dunno if SkinnyODST cares, I'm just curious. I assume it will, but sometimes devs sneak in workarounds for player-controlled characters.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Stop units driving vehicles?

Post by AnthonyBF2 »

I remember this turret ODF parameter NoAIBoard, it might work with vehicles, I can't confirm. It would look like:

Code: Select all

SetClassProperty("cis_hover_aat", "NoAIBoard", "1")
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Stop units driving vehicles?

Post by Oceans14 »

AnthonyBF2 wrote:I remember this turret ODF parameter NoAIBoard, it might work with vehicles, I can't confirm. It would look like:

Code: Select all

SetClassProperty("cis_hover_aat", "NoAIBoard", "1")
There's also NoEnterVehicles, not sure what the difference is. Also, I didn't know you could restrict AI access from the script, that's cool. I always figured you'd set it up like NoAIBoard=1 in the vehicle's odf.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Stop units driving vehicles?

Post by AnthonyBF2 »

Oceans14 wrote:
AnthonyBF2 wrote:I remember this turret ODF parameter NoAIBoard, it might work with vehicles, I can't confirm. It would look like:

Code: Select all

SetClassProperty("cis_hover_aat", "NoAIBoard", "1")
There's also NoEnterVehicles, not sure what the difference is. Also, I didn't know you could restrict AI access from the script, that's cool. I always figured you'd set it up like NoAIBoard=1 in the vehicle's odf.
Anything from a controllable ODF can be manipulated with SetClassProperty. This goes for turrets, vehicles, characters, ships and so on. I am just unsure if you can cross use ODF fucntions like NoAIBoard.

NoAIBoard is for turrets normally and does exactly what it sounds like. NoEnterVehicles works for any character you can control, and it works on humans + bots at the same time.
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Stop units driving vehicles?

Post by Kingpin »

Code: Select all

NoEnterVehicles     	= 1
From Yoda's odf.
Post Reply