OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bardosy on 07 Sep 2006, 09:51:51
-
I read a lot of topic in this theme, but I can't find the answer to my question...
There is no ultimate solution to detect (with EH) a unit fire with silenced/not silenced weapon?
I mean, I know I can check the weapon and ammo type with what fired, but only checking this weapon/ammo is in an array or not. But there is a lot of weapon in the Addons and lot of ammos (in JAM too). I need a function which check the ammo/weapon type as a string it is contain the two letter "SD" or not contain.
Is it possible?
-
unfortunately there is no string manipulation in flashpoint, so there's no way to detect if "SD" is part of a string. the only way to do this reliably would be to construct an array of all the silenced weapons that exist for flashpoint. :confused:
-
Thanks badges!
An other (it's a nooby) question:
What have I check in a silenced weapon sqs: the weapon or the ammo?
-
this is the way i do it -
player addEventHandler ["fired",{if ("_this select 1 == _x" count ["GlockS","Bizon","HK","Uzi"] == 0) then {loud = true}}]
in other words, it checks the weapon. if it's not in the array of silenced weapons then the loud variable is set to true.