Home   Help Search Login Register  

Author Topic: Ethernal problem: silenced weapon EH.  (Read 991 times)

0 Members and 1 Guest are viewing this topic.

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Ethernal problem: silenced weapon EH.
« 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?
Fix bayonet!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Eternal problem: silenced weapon EH.
« Reply #1 on: 07 Sep 2006, 10:03:23 »
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:

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Ethernal problem: silenced weapon EH.
« Reply #2 on: 07 Sep 2006, 10:27:25 »
Thanks badges!

An other (it's a nooby) question:
What have I check in a silenced weapon sqs: the weapon or the ammo?
Fix bayonet!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Ethernal problem: silenced weapon EH.
« Reply #3 on: 07 Sep 2006, 10:30:13 »
this is the way i do it -

Code: [Select]
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.