Page 1 of 1

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

Posted: Sat Sep 02, 2006 1:36 pm
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.

RE: prevent ai from entering vehicle/building?

Posted: Sat Sep 02, 2006 2:00 pm
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

Posted: Sat Sep 02, 2006 2:03 pm
by RC-1290
or make a giant barier around them :P.
sorry,couldn't help it:P

Posted: Sat Sep 02, 2006 2:24 pm
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
)

Posted: Sat Sep 02, 2006 2:24 pm
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?

Posted: Sat Sep 02, 2006 5:19 pm
by Teancum
lol, XW just posted that above you :P You posted at the same time.

Posted: Sat Sep 02, 2006 5:35 pm
by archer01
Too bad the time stamp doesn't display seconds. :P