Page 1 of 1

Force AI vehicle spawn

Posted: Sat Oct 17, 2009 9:59 pm
by Commander_Fett
I'm working on a campaign map, and for one of the objectives, I want the player to destroy a vheicle. the vehicle doesn't spawn until after the player completes objective1, however (capturing command post rep2) and I'vebeen having trouble with forcing ai into the vehicle (otherwise you can blow it up before anybody gets in). Bobfinkl gave me this code, but he's not sure what goes at the beggining.Something about it seems off, too, though I'm not so great at this, so I could be wrong.( the team the command post for the vehice is team 5, command post is cis_inv1) I fyou need any more info, please ask

Code: Select all

		 something(
function(player)
if GetCharacterTeam(player) == 1 and GetCharacterClass(player) == "cis_inf_marine" then
EnterVehicle(player, "hag_spawn")
end
end
)

Re: Force AI vehicle spawn

Posted: Sun Oct 18, 2009 1:20 am
by Maveritchell
Just make it an autopiloted vehicle.

Re: Force AI vehicle spawn

Posted: Sun Oct 18, 2009 10:50 am
by Commander_Fett
How would I do that?

Re: Force AI vehicle spawn

Posted: Sun Oct 18, 2009 11:15 am
by DarthD.U.C.K.
you can use these lines:

Code: Select all

PilotType               = "self"
Controllable 			= "0"
AutoFire 				= "1"
autofire is probably obsolete though