OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Capman on 04 May 2004, 22:35:14
-
I'm making a little deathmatch mission and I can't figure out how to put guns and ammo in the ammo crate.
Basically I want lots of ammo, plenty of rocket launchers, machine guns, and sniper rifles.
Thanks for the help.
-
you mean something like this
; ***********************************************************************
; **** Custom crate script for Operation Flashpoint
; **** Generated by Chris's OFP Script Editor
; **** Crate Builder Wizard 2.0
; ****
; **** ORIGINAL FILE NAME: CUSTOM_CRATE.sqs
; **** INSTRUCTIONS: Run script from the INITIALIZATION box of the crate
; **** RUN CODE: [this] Exec "CUSTOM_CRATE.sqs"
; ***********************************************************************
; Get the crate parameter given
_crate = _this Select 0
; Remove the stock items from the crate
ClearMagazineCargo _crate
ClearWeaponCargo _crate
; Add the items to the crate
_crate AddWeaponCargo ["AT4Launcher", 50]
_crate AddMagazineCargo ["AT4Launcher", 250]
_crate AddWeaponCargo ["CarlGustavLauncher", 50]
_crate AddMagazineCargo ["CarlGustavLauncher", 250]
_crate AddWeaponCargo ["HuntingRifle", 50]
_crate AddMagazineCargo ["HuntingRifleMag", 250]
_crate AddWeaponCargo ["LAWLauncher", 50]
_crate AddMagazineCargo ["LAWLauncher", 250]
_crate AddWeaponCargo ["M21", 50]
_crate AddMagazineCargo ["M21", 250]
_crate AddWeaponCargo ["M60", 50]
_crate AddMagazineCargo ["M60", 250]
_crate AddWeaponCargo ["PK", 50]
_crate AddMagazineCargo ["PK", 250]
_crate AddWeaponCargo ["RPGLauncher", 50]
_crate AddMagazineCargo ["RPGLauncher", 250]
_crate AddWeaponCargo ["SVDDragunov", 50]
_crate AddMagazineCargo ["SVDDragunov", 250]
Exit
just copy and paste this and save it as a .sqs file,or if you are too lazy to do so just get the attachment.to run this just put this into the Init line of the ammo box [this] Exec "CUSTOM_CRATE.sqs"/I also recommend you get this program here http://ofpec.com/editors/resource_view.php?id=377 (http://ofpec.com/editors/resource_view.php?id=377)
-
Thanks, that's awesome.
Do I save the .sqs in the missions folder?
-
Yes, save the sqm in the mission folder.
-
Yes, save the sqm in the mission folder.
dont you mean sqs file :P
-
Yes, sqs (My fingers type ahead of my brain sometimes)
-
@oyman;
That is fine, I've done that, but my problem is that when I place some ammo in a crate - lets say for the sake of simplicity...;
_myCrate addMagazineCargo["Mine", 5]
What happens in my mulitiplayer maps is that EVERYBODY (atleast 2 players - since that is what I've been testing with) can pick up 5 mines EACH.... AAARRRRGHH... >:(
Any ideas?
-
hmmm, never experienced that before. In ANY multiplayer map you make, I would suggest you add a gamelogic named server it will solve many problems, perhaps even the one you are experiencing