How do you prevent ai from entering a vehicle/building?

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
Big_rich

How do you prevent ai from entering a vehicle/building?

Post by Big_rich »

I know there is a command for preventing AI from entering vehicles/turrets. I've used it before. But I cannot for the life of me find this stupid odf command.. anyone know off hand?

is it like:

DisableAI = "0" or something like that?

Another thing. I have a couple of tanks that the AI just refuse to use, anyone know a way to force the AI to enter vehicles? Or suggestions on how to make it more likely they will enter? I have placed pathing next to the tanks and such, but no luck on getting them to use them. I normally don't have a problem with them getting into vehicles, but on this map they are being problematic.
The_Emperor
Supreme Galactic Ruler
Posts: 2118
Joined: Sat Dec 10, 2005 6:30 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Waaaaay over there.

RE: prevent ai from entering vehicle/building?

Post by The_Emperor »

NoEnterVehicles = 1 in the odf to prevent them from getting into vehicles/turrets.
I don't know the solution to the other problem though
RC-1290

Post by RC-1290 »

or make a giant barier around them :P.
sorry,couldn't help it:P
xwingguy

Post by xwingguy »

sigh...I've already posted this before...just stick this into scriptpostload

OnCharacterEnterVehicle(
function(player, vehicle)
if (GetEntityClass(vehicle) == GetEntityClassPtr("NameOfVehicleClassInQuotes")) then
if not IsCharacterHuman(player) then
SetProperty(vehicle, "DisableTime", 0.25)
end
end
)
archer01

Post by archer01 »

Someone, I can't remember who or where, wrote a small script that booted AI out of a vehicle if they tried to enter it. Try searching for it in the forums.

If you can't find that, you could try the NoEnterVehicles solution above.
Or you could try using SetAIVehicleNotifyRadius(0) in your lua script. That's the range in which AI seek vehicles to enter is it not?
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

Post by Teancum »

lol, XW just posted that above you :P You posted at the same time.
archer01

Post by archer01 »

Too bad the time stamp doesn't display seconds. :P
Post Reply