OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Shodan on 26 May 2004, 19:56:40
-
this addWeaponCargo["M16", 3]; this addMagazineCargo["M16", 12];
according to Hotshots OFP commands manual , the above should put 3 M16 weapons and 12 M16 magazines into an ammo crate. It doesn't. :P Any suggestions?
-
It should work; I'm not sure what the problem is.
Some objects cannot hold weapons/ammo (people for example), and there is also a limit of how much an object can hold, so that may be your problem.
Are you getting an error message?
-
Some objects cannot hold weapons/ammo (people for example), and there is also a limit of how much an object can hold, so that may be your problem.
I know this is true, but crates should be able to have stuff put in.
According to the manual from hotshot, this should have put the aforementioned weapons and ammo into a crate I placed down. I used the exact words mentioned above, but when I preview, no M16 or ammo shows up in the pickup menu. :help: The only thing that shows is a single measly grenade.
-
I think you need to have space in your pockets in order to get the 'pick up ammo action'...
???
-
I think you need to have space in your pockets in order to get the 'pick up ammo action'...
???
ya you do need a space between your brackets
so it should be like this
this addWeaponCargo ["M16", 3]; this addMagazineCargo ["M16", 12];
:)
-
Try removing allweapons from the ammocrate first.
this removeallweapons
Maybe....
-
this removeallweapons
doesn't seem to recognise this command. ???
rearmammo1 addWeaponCargo ["M16", 10]
this worked, but it only put M16 magazines into the box. No rifle actually appeared in the pickup menu ::)
I did the exact same command except with ["LAWLauncher", 10] but nothing appeared at all.
I dunno, I'm pretty stuck.
-
to clear everything from an ammocrate/vehicle/etc it's:
clearweaponcargo this; clearmagazinecargo this
in the init line
and I really don't know why that line of code isn't working either..
straight from the command reference:
AddWeaponCargo
Description :
Adds weapons to a vehicle or ammo crate.
Syntax :
UnitName AddWeaponCargo ["WeaponType", Quantity]
Example :
MyCrate AddWeaponCargo ["M16", 3]
and Same thing for AddMagazineCargo
-
:hmm:
Right dudes, here's what's going down in groovetown today:
I've tried all the suggested methods above. I just need to make sure: I want a player to be able to approach some ammo crates and pick up a LAW Launcher weapon (Which they are not carrying beforehand). So far, I can put LAW Launcher ammo into the crate, but cannot get the player to pick up the weapon, only take ammo if they already have the launcher.
I can put a Launcher onto a player, but cannot ::) put any ammo on them. They carry the launcher but have no ammo and can only get it when they pick some up at a crate.
Do I have to do something in the init.sqs file? If so, I'm screwed 'cos I have no idea how to use that file. No idea where to begin, really.
It isn't such a huge problem that I can't put ammo on a player, but it would help for future reference to know how to put a weapon and ammo on a player rather than toting an empty launcher :P
-
Maybe try
removeallweapons this
on crate then add the stuff.
As for init lines for guys do this to add a LAw and one rocket.
this addmagazine "LAWLauncher"; this addweapon "LAWLauncher"
THere you go I hope. :)
-
its way easyer to use chris's ofp script editor... it'll make briefings, overviews, description files, ammo crate fillers all for you with simple easy button clicking ;)
get it here..... http://www.chenderman.com/games_ofp.htm
make the "sqs file", your ammo crate... save it in your user/mission/mission your working on name folder, then in the initialization field of the ammo crate type this out:
[this] exec "custom_crate.sqs"
change "custom_crate" to whatever you've named the ammo crate filler.
hope this helps u :)
-
Thank you all!
I still haven't managed to get the player to have any ammo for a LAW Launcher, and cannot put weapons that can be picked up in a crate, but thanks to all of u :D i can at least solve a few of my ammo box blues.
Cheers!:cheers: