OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OFPWiZard on 01 Feb 2005, 09:30:49
-
Other than looking within' the mission file... or well the addon file.
I would like to know where i can find the weapons on all the vechicals in OFP.
I found the weapon list for the players... it was an Excel Spreedsheet. :D
I looked under Scripts >> Weapons and Ammo... but nothing is there.
-
from the comref -
weapons vehicle
Operand types:
vehicle: Object
Type of returned value:
Array
Description:
Returns array of names of all vehicle's weapons..
Example:
weapons player
-
lost ???
sorry
-
mkay, well without trying it myself, i'd suggest writing a small script - in fact here:
;get the names of weapons
hint format["%1 \n %2","tank1", weapons tank1]
~10
hint format["%1 \n %2","tank2", weapons tank2]
~10
hint format["%1 \n %2","tank3", weapons tank3]
~10
exit
copy paste that into notepad, save as "what_weapons.sqs", then in your mission, put
[] exec "what_weapons.sqs"
in the init line of anything. this should work, assuming you've named your vehicles tank1, tank2 etc.
also note - there is a list of all the things you want in the official BIS comref. get it from this (http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=-1&catselected=-1_-1&catagory=-1&subcategory=-1_-1&numreturn=25&displayformat=0&ofpv=1&searchwhat=1&searchlevel=0&searchwhat=1&searchopts=&searchstring=official) page.
-
oHHHHH
comref = Command Reference... hehe
I R STUPID
:P :wave:
one thing... is that ; character use in many scripts a form of a REM statement. Such as in QBASIC / VBasic... you use a ' for a hidden value. It like passes on / doesn't read that "string."