Jump to content
Sign in to follow this  
Fiend

Set Vehicle Occupants\

Recommended Posts

I am very new to ArmA 2. The only experience i have is with OFPDR and some LUA scripting. That being said I want to be able to set the occupants in a vehicle. For instance, I would like to be able to put SF soldiers in HMMWV GPK at mission start as opposed to ordering them in to a vehicle with waypoints at mission start. In addition i would like to put them in specific positions in the vehicle ie driver, gunner, TC, cargo. Also does any one know how or if it is possible to change the weapon on a vehicle through scripting in the Int? For instance, have an M134 instead of a M2 on a HMMWV. Thanks!!

Share this post


Link to post
Share on other sites

To have units in set places in a vehicle at the start of a mission, name your HMMWV something like car1

In one units init line put.....

this moveindriver car1

In another units init line put...

this moveingunner car1

and another units init line put...

this moveincargo car1

and that sorts out the units in the vehicle from the start.

as for the changing of a vehicles weapon, then as far as I know, you would need a whole new addon made for the vehicle to have a new weapon installed.

Share this post


Link to post
Share on other sites

I'm stealing this thread to ask something else concerning slots in vehicles.

I'm trying to check who is in cargo, but there is no simple "cargo vehicle" -command.

"unit in (crew vehicle) && unit != driver vehicle && unit != gunner vehicle && unit != commander vehicle" returns true if unit is in cargo (Or in a turret). Is there a better way to do it? And better still, is there a way to check who is in the front seat (Well, the index number depends of the vehicle, but that is doable). I have browsed arma 2 commands list couple of times, but haven't found the solution for this yet. And I do recall there was one back in the arma 1 times.

(Going to add an action what is visible only to the guy who sits in the front seat of a vehicle).

Share this post


Link to post
Share on other sites

Thanks alot Koni, that definately helped!!!!

Share this post


Link to post
Share on other sites

i did exactly this and i keep getting an error message that says "moveindriver: type any, expected object"

this moveindriver "a1";

apparently this code is wrong? and yes the vehicle is named a1 and no other vehicle is named a1, does it matter if it's an empty spawned vehicle?

nvm problem solved the exact code is " this moveindriver a1; " my bad

Edited by OOster

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  

×