OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SnakeFart on 08 Apr 2003, 01:14:38
-
im using a ranger mod and i want to know if its possible to add every weapon to an ammo crate without have to to put this addweapon...blah blah blah ..is there an init that will fill an ammo crate up completly?
-
Put this in init.sqs
"_x addmagazinecargo {M16,99}; _x addweapon {m16}" forEach [ammocrate1,ammocrate2]
Syntax even more unguaranteed than usual, as its late, but if you get the idea it will save you writing it out over and over again.
-
ok where do i put that at? in Init or script?
sorry im new to all of this
-
Init field will be fine for executing it.
-
and to executing it i have to make it with not pad and then sve it as an sqs file right?...and what is the correct init to remove all weapons?
i have: this removeallweaspons;
but that then says error
-
To remove all weapons from a unit type in the init field: removeallweapons this.
-
ok so u put this after removeallweapons and not in front of it?...and do i do it in the same order to take out ammo?
-
comeone plz soneone answer im stuck till i get a correct answer
-
removeallweapons this
in the init field will remove all weapons from the object in which init field the command is.
the vise versa method goes only for removeallweapons command. so if you do anything else you put in THIS in front of the command and not after like in this particular case.
-
ok so to perfect it ...if i want to remove all the weapons from a person i type
removeallweapons this and they wont have anything
-
:oYou've got it!! :o ;D ;)
-
COOL
SOLVE!