OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: nitespectre88 on 21 Jan 2004, 00:23:57
-
Can someone tell me how i can modify a units weapon? like on a Black Op's HK to a M21 and adding a LAW Launcher. It would help best if the info is for OFP: Cold War Crisis.
-
You want a combination of removing their existing weapons, and adding new weapons.
Its best to start out with a fresh unit;
In the units INIT field put;
RemoveAllWeapons This
THen you want to add ammo for the weapon, its best to add the ammo first as there is a bug if you add the weapon first, there ends up no ammo in it.
This AddMagazine "M21"
Then to add the gun;
This AddWeapon "M21"
This adds one magazine and one weapon. Put semi colons " ; " between each command to seperate them, so you might end up with an init line that looks a bit like this;
RemoveAllWeapons This; This AddMagazine "M21"; This AddWeapon "M21"; This AddMagazine "M21"; This AddMagazine "M21"; This AddMagazine "M21"
-
sure....put the following into the unit's init field:
removeallweapons this; this addmagazine "M21"; this addMagazine "M21"; this addMagazine "M21"; this addMagazine "M21"; this addWeapon "M21"; this addMagazine "LAWLauncher"; this addMagazine "LAWLauncher"; this addMagazine "LAWLauncher"; this addWeapon "LAWLauncher"
you can do this also in a script and just call the script from the units init field
but always make sure to add first magazines before adding the respective weapon, else the weapon wouldn't be loaded.
-
so the word "this" needs to be in the init path as well? do I also do the same for crates as well?
-
'this' in the init field always represents the unit you are editing.
If your unit has a name, you can change 'this' to the unit's name, but there is no meaning of it. Using 'this' is much more simpler and faster...
For Crates you should use this:
this addweaponcargo ["M21",1]; this addmagazinecargo ["M21",10]; this addweaponcargo ["LAwLauncher",1]; this addmagazinecargo ["LAWLauncher",6]
-
this addweaponcargo ["M21",1]; this addmagazinecargo ["M21",10]; this addweaponcargo ["LAwLauncher",1]; this addmagazinecargo ["LAWLauncher",6]
the numbers behind the weapon name stands for the amount you'll put into the crate.
For all weapon names, look if you find the command reference (comref)...afaik theres a list with all valid weapon names...if someone has a link to it, plz post it
-
Editors Depot - Tutorials - References. (Link in my sig line below)
Several weapon and ammo lists in there as well as other handy stuff.
-
hmmm...m8 it be that the editors depot doesn't like Netscape? i can't get into the tutorials menu...all i get is repeatedly the Welcome site....
or is just because it is still under re-construction? btw...how long till ofpec.com will be back online in it's full beauty?
no pushing you guys...just asking ;-)
:edit:
yep...IE works...but on sites with more than 1 page (1 2 3 4...) i just get the first
-
Try here:
http://www.ofpec.com/editors/index.php
Planck
-
same...works on IE but no workee on Netscape....and still not working to look the next page in tut's or scripts....just the 1st page displays....
-
set it to display the first 100 objects.........you should get them all then.
Planck
-
hmm... the tutorial page doesnt for for IE or Netscape for me. It keeps on going back to the welcome page. Must be still under construction. Since I can't get to the lists they have of the weapons in there, any of you know what the name is for the G36? Thanks for the help guys/gals.
-
G36a........................................................G36aMag
Planck
-
WEST:
Weapon Name . . . . . . . . . . .Ammo Name
HK . . . . . . . . . . . . . . . . . . . . .HK
M4 . . . . . . . . . . . . . . . . . . . . .M4
M16 . . . . . . . . . . . . . . . . . . . .M16
M16GrenadeLauncher . . . . . .M16GrenadeLauncher
M60 . . . . . . . . . . . . . . . . . . . .M60
M21 . . . . . . . . . . . . . . . . . . . .M21
MM1 . . . . . . . . . . . . . . . . . . . MM1magazine
G36a . . . . . . . . . . . . . . . . . . .G36amag
XMS . . . . . . . . . . . . . . . . . . . .M4
Steyr . . . . . . . . . . . . . . . . . . .SteyrMag
LAWLauncher . . . . . . . . . . . ..LAWLauncher
CarlGustavLauncher . . . . . . .CarlGustavLauncher
AALauncher . . . . . . . . . . . . . .AALauncher
LaserDesignator . . . . . . . . . .LaserDesignator
Mortar . . . . . . . . . . . . . . . . . .Mortar
EAST:
Weapon Name Ammo Name
AK74SU . . . . . . . . . . . . . . . . .AK74
AK74 . . . . . . . . . . . . . . . . . . .AK74
AK74GrenadeLauncher . . . . .GrenadeLauncher
AK47CZ . . . . . . . . . . . . . . . . .AK47
AK47GrenadeLauncher . . . . .GrenadeLauncher
PK . . . . . . . . . . . . . . . . . . . . .PK
Kozlice . . . . . . . . . . . . . . . . . .kozliceball, kozliceshell
Bizon . . . . . . . . . . . . . . . . . . .BizonMag
SVDDragunov . . . . . . . . . . . .SVDDragunov
RPGLauncher . . . . . . . . . . . . .RPGLauncher
AT4Launcher . . . . . . . . . . . . .AT4Launcher
9K32Launcher . . . . . . . . . . . .9K32Launcher
6g30 . . . . . . . . . . . . . . . . . . . .6g30Magazine
EQUIPMENT:
Binocular
NVGoggles
Flare . . . . . . . . . . . . . . . . . . .Flare
FlareRed . . . . . . . . . . . . . . . .FlareRed
FlareGreen . . . . . . . . . . . . . . .FlareGreen
FlareYellow . . . . . . . . . . . . . . .FlareYellow
SmokeShell . . . . . . . . . . . . . .SmokeShell
SmokeShellRed . . . . . . . . . . .SmokeShell Red
SmokeShellGreen . . . . . . . . . .SmokeShell Green
HandGrenade . . . . . . . . . . . . .HandGrenade
Pipebomb . . . . . . . . . . . . . . . .Pipebomb
Timebomb . . . . . . . . . . . . . . .Timebomb
Mine . . . . . . . . . . . . . . . . . . . .Mine
here's the complete weapon and ammo list, used in 1.3 and later.
hope this helps you.