Home   Help Search Login Register  

Author Topic: ammo script  (Read 1023 times)

0 Members and 1 Guest are viewing this topic.

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
ammo script
« on: 14 Oct 2004, 20:53:05 »
Is there a basic ammo script the people and use for missions? What I am looking for is a "template" of a basic ammo script that I can add custom weapons to without haveing to type them in the Init line every time....thanks guys!


Regards,
Trash Can Man

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:ammo script
« Reply #1 on: 14 Oct 2004, 21:55:56 »
Chris OFP editor can do what you want and more.  Get it here:
http://www.chenderman.com/CHOFPSE.htm

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:ammo script
« Reply #2 on: 14 Oct 2004, 23:40:52 »
I tried using that program and when I goto test it, it never works!!  AARRGGHH!! This is getting more fustrating! When using an ammo script, or any other script for that matter, do you have to name the ammo crate?

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:ammo script
« Reply #3 on: 14 Oct 2004, 23:57:47 »
to add ammo to the ammo crate? No, you don't.
all you have to do is type this in the init line:
Code: [Select]
this addMagazineCargo ["AK74",2000]; this addWeaponCargo ["AK74",2]notice the 'this'. To execute the scripts from Chris' OFP editor, did you put the script in you mission folder, then add
Code: [Select]
this exec "[i]nameofscript[/i].sqs" in the unit's init line? That's all you need to do to get them working.  ::)
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:ammo script
« Reply #4 on: 15 Oct 2004, 00:26:14 »
well, I know how to put "this" ine the init line I know that the .sqs file is in the missions folder where it belongs. but I am not sure why it's not working....I'll ask in other forums


Regards,
Trash Can Man

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:ammo script
« Reply #5 on: 15 Oct 2004, 01:25:49 »
try two things then, m8:
use [] instead of this, or check your script to see if you aren't defining any varibles. You might need to add a [unitname] instead of [] if the script needs a unit to add the weapons to.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:ammo script
« Reply #6 on: 15 Oct 2004, 03:11:31 »
uugghh well, I have no idea what i'm doing wrong. The program stated above, only give proportional information. all I'm really looking for a ta template of a very "basic" ammo script. Anyone know where I can get one of those?


Regards,
Trash Can Mam

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:ammo script
« Reply #7 on: 16 Oct 2004, 03:39:03 »
okay, place the object you want to add ammo to in the mission editor. type this code into his init line:

Code: [Select]
[unitsname,"weaponname","magname"]exec "unitReammo.sqs"unitsname = the name of your object
weaponname = name of the weapon to add
magname = name of the mags to add

e.x. [loon_1,daa_m16op,daa_m16mag] exec "unitReammo.sqs"

then copy the attached file unitReammo.sqs into your mission directory

n.b. THIS IS FOR UNITS A.K.A. MEN ONLY

« Last Edit: 16 Oct 2004, 03:45:06 by Tyger »
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:ammo script
« Reply #8 on: 16 Oct 2004, 03:41:32 »
to add weapons to a crate, put the following in the crate's init:
Code: [Select]
[cratename,"weaponname","ammoname"] exec "crateRearm.sqs"
follow the same as bellow for this script.

n.b. ONLY FOR CRATES ::)
« Last Edit: 16 Oct 2004, 03:43:51 by Tyger »
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08