Home   Help Search Login Register  

Author Topic: silenced/non-silenced weapon detection  (Read 483 times)

0 Members and 1 Guest are viewing this topic.

FLBEE

  • Guest
silenced/non-silenced weapon detection
« on: 26 Nov 2004, 17:38:30 »

I have some guys in my mission simulating sleeping.

What i'm trying to do is have the other "sleeping" troops not wake up when you use a silenced weapon nearby, and wake up if a non silenced weapon is used.

Where would I need to look to find this info?

[ The guys that are "sleeping" are dead body objects set to .5 dammage, and if they are not "killed"-complete dammage, a enemy soldier will be spawned as the deadbody is deleted when alarm goes off.]

thx for your time

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:silenced/non-silenced weapon detection
« Reply #1 on: 26 Nov 2004, 17:58:55 »
I'm not exactly sure, but the starting point is an eventHandler "fired" added to the units that are doing the relevant shooting.    When the unit fires the EH starts a script which checks what weapon was fired:   if it is a silenced type there is one outcome, if loud, another.    Obviously you as mission designer know what weapon types there are in the mission.
Plenty of reviewed ArmA missions for you to play

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:silenced/non-silenced weapon detection
« Reply #2 on: 26 Nov 2004, 19:01:46 »
If you can't get that to work, you can download COMBAT!s M577 pack, which comes with a tent where players 'in cargo' are sleeping. They get out if someone fires a shot, But i'm not sure if it will work with silanced weapons  ???
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:silenced/non-silenced weapon detection
« Reply #3 on: 27 Nov 2004, 06:02:26 »
Try something like this in the player's init field:

this addeventhandler ["FIRED",{if (not ((_this select 1) in ["hk","Bizon","Uzi"])) then {[] exec "script.sqs"}]

That should detect if the player fired anything other than the Mp5, Bizon or Uzi and run script.sqs if they did.

FLBEE

  • Guest
Re:silenced/non-silenced weapon detection
« Reply #4 on: 28 Nov 2004, 02:51:25 »
Thanks!  ;D