Jump to content
Sign in to follow this  
Pl4t0

Force AI to automatically Exit a Vehicle?

Recommended Posts

I'm pretty noobish when it comes to scripting/editing, and I think this is a fairly obvious question:

I was doing a helicopter insertion for a SP mission; the player is accompanied by AI, and I wanted to have them get out on their own rather than just sit there and have to be manually told by the player to disembark.

So how would I go about making the AI (a 7 man rifle squad) automatically disembark from the chopper once it reached the insertion point?

Edited by Pl4t0

Share this post


Link to post
Share on other sites
A "get out" waypoint works.

or you can use commands like these in a trigger:

unassignVehicle AIname1; unassignVehicle AIname2;

and so on..

or

{unassignVehicle x} forEach crew yourchoppername;

http://community.bistudio.com/wiki/unassignVehicle

or

AIname1 action ["eject", yourchoppername];

if you'r impatient. ;)

The "unassign" command didn't work properly (probably a mistake on my part), and while the Eject command did have the squad Parachute in rather than wait for the chopper to land (which was pretty cool, but unfortunately caused the entire squad to be wounded on hitting the ground).

However, I was looking at the BIS Scripting Wiki, and after some experimentation i found that the "commandGetOut" and "doGetOut" commands work perfectly for an insertion.

Share this post


Link to post
Share on other sites

I've tried searching, but all I can find (as in this thread "Force AI to automatically Exit a Vehicle?"), is the exact opposite of what I want.

I'm looking for a way to force my AI to go down with the ship, so to speak. NOT to disembark, even if vehicle takes damage.

I don't wanna just remove their brains, I'd like for them to still use their guns, fighting to the death and whatnot, but simply do NOT get out of the vehicle.

If you know a way, please share!

...... punch and pie

Share this post


Link to post
Share on other sites
I've tried searching, but all I can find (as in this thread "Force AI to automatically Exit a Vehicle?"), is the exact opposite of what I want.

I'm looking for a way to force my AI to go down with the ship, so to speak. NOT to disembark, even if vehicle takes damage.

I don't wanna just remove their brains, I'd like for them to still use their guns, fighting to the death and whatnot, but simply do NOT get out of the vehicle.

If you know a way, please share!

...... punch and pie

Hi Flagg,

Look up the commands to disable AI, sorry I don't remember the syntax right now but its pretty simple since I use the command from time to time. Basically you are switching off their brain and they'll do nothing but die.

Share this post


Link to post
Share on other sites

Hi. Thanks for the reply. I thought I saw a command like that somewhere, even UPSMON has something called noai - and I suppose I should at least try it.

But what I'm doing is sort of a VDM (vehicle death match), and one of my end game losing triggers is getting out of your vehicle. But my bots haven't quite grasped that idea yet. They keep bailing out when we take damage, and costing me the game. I need them to stay at their guns, and keep firing, no matter what, until we are completely toast.

If possible, of course. If not, I'll be forced to be human-play only. Cause lord knows you gotta have guns. Lots and lots of guns.

Share this post


Link to post
Share on other sites

Try locking the vehicle. When you place the vehicle in the Editor, one of the options when you select the unit type should say lock. You should change this from default to locked.

I may be completely misunderstanding you though

Share this post


Link to post
Share on other sites

lock/unlock is for playable units I believe.

I've searched myself many times and as yet I haven't found a way to keep units alive and inside a destroyed vehicle.

The other problem is that if the vehicle is destroyed so is the gun anyway.

You can't even keep a Civ in a vehicle when it hears shooting.

I've tried attachto,dissableAi "move","anim" and disablesimulation with no joy.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Well thanks very much for the info. Reason I got frustrated is because sometimes it seems like they bail before the vehicle is actually destroyed, I thought I saw them bail when the vehicle was damaged, but not destroyed.

But, if it can't be done, it can't be done, so be it. It'll have to be humans in the vehicle. It's not meant to be a real serious 'project' anyway. Will finish it and move on to next. Or I guess I could just remove the end trigger about getting out of vehicle. Dunno.

Thank you F2k Sel, and company, for the replies.

Share this post


Link to post
Share on other sites

I did a little test on vehicles (not boats/ship) and found they bail as soon as the vehicle can't move. The gun was still functional as only the tires were damaged. Boats seem a little different as they seem to keep moving until they sink. It does look like the gun isn't damaged at times but there's still no real way of keeping them shooting.

If the gun wasn't mounted on the boat but simply attached that work but I don't think you can remove an existing gun and you can't easily swap positions as you get flung out the boat.

Share this post


Link to post
Share on other sites

What about super new hi-tech tires that can't be shot out, and increased health (armor plated) vehicle bodies? ;) Ya know, all in the name of fun. Possible? Something like allowdamage 0 on the tires, but setdamage -5 or something on the body? Or am I just wasting my (er.. your) time?

Only reason I ask these weird questions lately, is because I just thought it might be interesting (and maybe fun) to try to recreate this atmosphere in Arma2;

by using;

FAV by Emery & Rubenwolf (for obvious reasons)

Desert Mercenaries and BlackOps by SchnapsdroSel (for the wicked lookin' gas masked dude in top gunner seat)

Car Radio by Clayman (for the same song that's in commercial)

and I wanted it so you can last awhile in some heavy shit, to really feel like hell on earth, before you finally bite the dust.

What I have so far;

http://rapidshare.com/files/417972100/BFBC2.Zargabad.pbo.7z

Using Zora to keep you driving around the city, trigger so that if you can hang 10 mins, you win. Car dies, you lose.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×