Home   Help Search Login Register  

Author Topic: editing weapons  (Read 599 times)

0 Members and 1 Guest are viewing this topic.

minimilo

  • Guest
editing weapons
« on: 06 May 2004, 18:42:09 »
when i place ammo crates, how do i make certain weapons and ammo appear in them, (what is the code, and wot box do i put it in??)
cheers

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:editing weapons
« Reply #1 on: 06 May 2004, 18:43:41 »
Check out the commands addmagazinecargo and addweaponcargo in your comref. :)

:beat: *Gets Shot* :beat:

minimilo

  • Guest
Re:editing weapons
« Reply #2 on: 06 May 2004, 18:51:05 »
soz bout dis im kinda new, what is comref, also, can i give a soldier a weapon just like ammo crates,
cheers

j-man

  • Guest
Re:editing weapons
« Reply #3 on: 06 May 2004, 19:12:27 »
to add a weapon to a ammo box, put this into it's init field:

Code: [Select]
this addweaponcargo ["M16",5]; this addmagazinecargo ["M16",5]
this will add 5 M16's and 5 M16 mags.

To add a weapon to a soldier, use this:

Code: [Select]
removeallweapons this; this addmagazine "M16"; this addmagazine "M16"; this addmagazine "M16"; this addmagazine "M16"; this addweapon "M16
this will remove all of the soldiers previous weapon, and then add 4 M16 mags and a M16 gun.

The comref is the official command reference. This is a list of all the scripting commands that can be used in the game. I siggest looking in the editors depot for tutorial on scripting and mission editing.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:editing weapons
« Reply #4 on: 06 May 2004, 19:17:28 »
Hey minimilo!

    Check out this page and you will see an ammocrate filler script. You can also do this manually. Look on this page and scroll down to "addweapon" and "addmagazine". Be sure to read the comments under these commands as they contain some useful info.

                                                                      Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

minimilo

  • Guest
Re:editing weapons
« Reply #5 on: 06 May 2004, 19:55:40 »
thnx ppl

minimilo

  • Guest
Re:editing weapons
« Reply #6 on: 06 May 2004, 20:04:13 »
ive put in what it says, an "unknown operator" cums up

j-man

  • Guest
Re:editing weapons
« Reply #7 on: 06 May 2004, 20:25:18 »
What exactly have did you put in ???

EDIT

if you put in what I said, then it's wrong. I made a mistake while typing  it. Here's how it should look:

Code: [Select]
removeallweapons this; this addmagazine "M16"; this addmagazine "M16"; this addmagazine "M16"; this addmagazine "M16"; this addweapon "M16"
« Last Edit: 06 May 2004, 20:26:57 by j-man »