Jump to content
Sign in to follow this  
Apollo

Help needed with add/remove weapons script

Recommended Posts

Hello

I'm in the making of a COOP mission ,and i wan't all the playable soldiers to only have a sidearm and some grenades.Now i made a little script with in there all commands. (removeweapon ,addweapon ,addmagazine's and removemagazine's for previous weapon, etc...)

Now i let this script run from the command line with the command [] exec "myscript.sqs".

This script run's fine if i only use it in the comand line of One unit (e.g the player soldier) ,but it only run's once if i put the exec line in the command line of Multiple unit's ,so only 1 soldiers gear is changed.

How can i make all unit's run that same script?

Share this post


Link to post
Share on other sites

can you post your script ?

this is my method:

no script

Init field of every MP Unit (copy/past):

RemoveAllWeapons this; this AddWeapon "M16"; this AddMagazine "M16"; this addmagazine "M16" ...

By scrpiting you need problably do that

[this] exec "script.sqs" in init field

and the script :

_Ap= _this select 0

RemoveAllWeapons _Ap

_Ap AddWeapon "M16"

_Ap AddMagazine "M16"

....

exit

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×