OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Dajan on 19 Jan 2008, 15:28:05
-
Couldn't find this anywhere, if its about plesae redirect me!
I'm creating mission using scripts to change units loadouts - thus avoiding cluttered INIT fields - however I can't work out how to use scripts to change the loadout of the crews, say the driver and gunner of a MG Jeep.
Obviously this exec "xxxx.sqs" works for units, but what do I have to change to do the above?
Thanks in advance
-
you could use the syntax
removeallweapons (driver vehicle_name)
(driver vehicle_name) addmagazine "ak74"
alternatively there is a shortcut. add the letter 'c', 'd' or 'g' to the name of the vehicle to grab its commander, driver and gunner respectively. thus the syntax above becomes
removeallweapons vehicle_nameD
vehicle_nameD addmagazine "ak74"
untested but should work.
-
So you there's no way to use a script, it has to be done longhand?
-
see attached.
-
Thanks bedges, I'll give that a spin
-
heheh, too fast... i've updated on reading your first post again. download that one. uses more useful script.
-
{_x exec "change_weapons.sqs"} forEach crew yourVehicleNameHere