OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wolf on 14 Apr 2003, 21:48:53

Title: Weapons script
Post by: Wolf on 14 Apr 2003, 21:48:53
Ok, heres what I got, I have a large mission, with lots of men, and now I need to change alot of weapons for them, and instead of using alot of addweapons, and addmagazine to the init line, I'd like to use one or two scripts with different loadouts, and simply put the
"whatevergoeshere" exec "weapons.sqs"
But I don't know how to make this work.
I tryed using a couple of those script makers in the depot, but none of them will work, they either give me an error about the script, or do not work at all.
Could anyone make and post one of these scipts? and then I could simply edit it the way I need it.
Thank you.
Title: Re:Weapons script
Post by: Wolf on 15 Apr 2003, 16:22:15
Can anyone help me with this?
Title: Re:Weapons script
Post by: LCD on 15 Apr 2003, 16:43:58
cant u just scrpit it urself ? ;D

make script called somthin.sqs ;D

nd den

_unit = _this select 0

removeallweapons _unit

_unit addmagazine "watever"
_unit addweapon "watever"

etc..

its just like init line ;D

LCD OUT
Title: Re:Weapons script
Post by: Wolf on 15 Apr 2003, 21:24:01
ok, first, I still have almost zero scripting ability. So I have no idea how to make my own scripts.

So, if I make a script, with that in it, how do I execute it for multiple units?
Title: Re:Weapons script
Post by: LCD on 15 Apr 2003, 23:31:28
only do

[unitname] exec "scriptname.sqs"

4 every unit ;D

LCD OUT
Title: Re:Weapons script
Post by: Wolf on 16 Apr 2003, 05:22:30
Excellent, perfect, thanks LCD.