OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Nemesis6 on 20 Jul 2004, 15:39:23
-
I need to add an array of weapons inside the following script instead of just giving it ONE in the init field... help!
To start the script - this addEventHandler["fired",{(_this + ["LAWLauncher"]) exec "Effects\Units\BackBlast.sqs"}]
-
- You don't need to use private[] in an sqs script
- Why would you need the variable _blastweapon? Didn't see any reference to it later in the script...
You simply put in the script something like this:
_weps = ["LAWLauncher","RPGLauncher","9k32Launcher","CarlGustavLauncher"]
and then before the smoke drop stuff you put:
? !(_weapon in _weps): exit
That checks if the fired weapon is not in that weapon array, and if so exits the script so there's no backblast....
Or was this at all what you were after... ???
No guarantees that it will work though...
ECP does not use this kind of thing so they probably have another method of checking the weapon so riffles don't have backblast, but dunno how they do it...
-
I'm in progress of testing what you're talking about in a seperate script... but for now, Stargate is in a commercial brake!
(By the way, I know what the different things do, I'm no rookie)
-
(By the way, I know what the different things do, I'm no rookie)
I just thought better safe than sorry...
because usually when replying shorly without explanations the next reply is asking 'wth is that??'.... :P
-
No problem. It worked, thank you!! :-)