OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: mpatton on 26 Jan 2010, 03:42:44

Title: Making AI squad utilise and empty vehicle
Post by: mpatton on 26 Jan 2010, 03:42:44
Hi,
Basically what I want to have happen is an AI-controlled squad gets into an empty vehicle, in the same way they would a manned one. For example, how you can make 2 AI squads, one a human and one a vehicle, then sync "get in" and "load" waypoints. I want the same effect to happen, but with an empty vehicle.

My thoughts are to either start a vehicle then remove everyone in it either via a trigger or the init box or to somehow make an empty vehicle use waypoints. Anyone know how to do that? Or anything that would get the same effect?

Oh, and I'm relatively new to this. So be please try to keep the stuff simple :D  Keeping stuff within the editor, like triggers and such, would be very very appreciated.

Thanks
Title: Re: Making AI squad utilise and empty vehicle
Post by: Wolfrug on 26 Jan 2010, 19:47:43
Simply 'attach' the waypoint to the vehicle by, when in Waypoint mode (F4 I think), double-clicking on the empty vehicle. Now the waypoint will be 'stuck' on the vehicle (you can move it, and the waypoint, around by holding down Shift when holding your mouse over the vehicle). The squad leader will now order everyone to board it as he sees fit. The only problem with this is that it's annoying to use shift to move the waypoint/vehicle around, but if that's not an issue then this should solve it.

Alternatively you can use the Get In waypoint and the series of "assignAs" (driver, commander, cargo, gunner) commands: COMREF Letter A (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=a). This is in a situation where you know no-one is going to get killed (i.e. the one assigned as driver will certainly survive). Simply assign everyone their places in their init fields (this assignAsCargo nameOfCar) and then place a Get In waypoint close to the empty vehicle, and they'll be ordered to get in when they're close. This will also allow you to fine-tune the assigned positions - who's gunner, who's driving etc.

Is that what you wanted?

Wolfrug out.