OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: eagle-eye on 26 Apr 2003, 12:59:15

Title: Question about making a script to add equipment
Post by: eagle-eye on 26 Apr 2003, 12:59:15
Being totally new to the world of scripting, I would like to ask advice since I have some probs :)

I have a soldier, I want to remove all equipment whatsoever, binoculars, weapons etc. Then I would like to have a script that adds equipment I want. How would that script look like and how would it be started?
Title: Re:Question about making a script to add equipment
Post by: CrashnBurn on 26 Apr 2003, 15:27:57
You can script it but it's not necessary. You can do it in the units initialization, or in the init.sqs file. Either way lets you skip writing a new script that isn't really needed.

In your init.sqs do something like this-

removeallweapons loon1
loon1 addmagazine "HK"
loon1 addmagazine "HK"
loon1 addmagazine "HK"
loon1 addmagazine "HK"
loon1 addweapon "HK"


get the idea ?
Title: Re:Question about making a script to add equipment
Post by: eagle-eye on 26 Apr 2003, 16:00:03
Yep, thanks alot. I found out that the init field of an unit is one way to do it, asked it just because if you have lot's of equipment and magazines you can't see them all at once coz they're at the same line. By doing it in the init.sqs you can see them all in once :) Thanks :)