OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Baseheadz on 15 Jul 2003, 19:55:01
-
I'm completely new to scripting. but I do know how to do quite a bit with the editor.
I would like to know how to add a particular type of soldier to a vehicle.
So if I have a dessert hummer, I would like the driver and passenger to be in desert camo, not in the standard woodland camo.
Also, I would like to be able to assign a particular type of weapon to a soldier.
Is any of this possible? Thank you all very much in advance.
-
1. place empty vehicle, name vehicle -> place any unit you like, put in the units init-field
driver: this moveindriver nameofvehicle
cargo: this moveincargo nameofvehicle
other possibilities (depends on vehicle) are moveingunner or moveincommander
2. remove the units weapons first:
removeallweapons this
and then add what you need, magazines first (or unit will start with empty weapon):
this addmagazine "AK47"; this addweapon "AK47"; this addweapon "binocular"
you can do all in the init-field of the unit if you like (ex. driver,binocs,AK47+3mags):
this moveindriver nameofvehicle; removeallweapons this; this addmagazine "AK47"; this addmagazine "AK47"; this addmagazine "AK47"; this addweapon "AK47"; this addweapon "Binocular"
correct spelling of weapon-names is important, thereÂ's a list somewhere in the EDITORS DEPOT ... !!! (there are a lot of good tuts too) ;D
-
Yo Pete, I'm going to try this out and reply and tell you if it works..thanks