OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kaja on 11 Dec 2002, 23:17:29
-
I have been trying to write a script to get a listing of weapons and magazines in the cargo space of a vehicle. However, the "weapon" and "magazines" commands don't seem to work on vehicles.
Anybody know where the weapons and ammo placed into the cargo space of a vehicle are stored? (e.g. by the add*cargo commands, or the "put * to vehicle" in the action menu)
Thanks in advance.
-
yo dude
put this in the init field of the vehicle:
addweaponcargo "m16" (you van do every weapon you want, just fine a weapon name list)
2nd option is this:
put this in the init field of the car:
[this] exec "weapons.sqs" (or whatever weaponscript you made)
tip: use chris ofp editor to make fast and good weapon and ammo crate script
bye
-
Hello,
My problem isn't getting a weapon or magazine into the cargo space of a vehicle, it's getting an array of the weapons and ammo in the cargo space of a vehicle out for use in a script.
In OFP:R you can use the action menu to place some of your weapons or ammo into the cargo space of most vehicles, but there doesn't seem to be a way to get a list of that stuff. Using the "weapons" and "magazines" commands didn't work for me because both commands returned a list of the weapons/ammo that the vehicle itself was armed with, not what it had in the cargo space.
The only way I can figure to get a list is through the WeaponPool, which I have experimented, but had no success with. I am unsure if the game will allow you to use the WeaponPool in "real time" to access the lists of weapons/ammo in vehicle cargo areas during a single mission, or only as advertised to move unit and cargo states across missions.