Home   Help Search Login Register  

Author Topic: looking for the " enemy fired" or "detect enemy or who fired"  (Read 1263 times)

0 Members and 1 Guest are viewing this topic.

Offline Chammy

  • Members
  • *
  • I'm a llama!
 wonder if theere is a script that detects who fired, or who fired what, or detect type of weapon fired. something like taht, I cant seem to find it in search option.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:looking for the " enemy fired" or "detect enemy or who fired"
« Reply #1 on: 21 Aug 2005, 00:13:57 »
take a gander at this.

Offline Chammy

  • Members
  • *
  • I'm a llama!
Re:looking for the " enemy fired" or "detect enemy or who fired"
« Reply #2 on: 21 Aug 2005, 00:45:34 »
Now with these I can have a detect who fired what and have it trigger something, like lets say, a sound sample at the saem time? And if so how would I execute this? thanks bedges. :)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:looking for the " enemy fired" or "detect enemy or who fired"
« Reply #3 on: 21 Aug 2005, 00:51:32 »
Usually the immediate consequence of an EH is that a script is called.  The script does whatever you need to do.    You can add the EH to a whole bunch of units and the script called by it checks the circumstances of that particular firing and creates consequences - like sound files - accordingly.   Be careful though, if you add an EH fired to every unit on the map and it launches a long script, you're going to get lag.   EHs themselves cause very little lag, but if you are cavalier with them the consequences can be a severe problem.

What is the underlying situation here?  What are you trying to achieve?
Plenty of reviewed ArmA missions for you to play

Offline Chammy

  • Members
  • *
  • I'm a llama!
Re:looking for the " enemy fired" or "detect enemy or who fired"
« Reply #4 on: 21 Aug 2005, 02:35:31 »
Ok, my idea.....:    I wanted to create a trigger wide enought to cover a certain area.  Now maybe other triggers for separate events.  My idea was  for anytime either AI or players/players fire their weapon it triggers a sound sample at the same time. My idea was to put it in an area like a city that had alot of buildings or a forest and create some end reverb for the rifles to simulate that they are firing in that area. Then when they step out of that area trigger out into the open there is no trigger to set off the sound sample. Gosh i hope I explained that clearly.

bored_onion

  • Guest
Re:looking for the " enemy fired" or "detect enemy or who fired"
« Reply #5 on: 21 Aug 2005, 10:11:16 »
use the "foreach" command to attach an eventhandler to every person in a trigger. it will work but heed macguba's warning about lag.

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:looking for the " enemy fired" or "detect enemy or who fired"
« Reply #6 on: 30 Aug 2005, 22:15:17 »
There is no need to start any scripts or non-BIS functions from the 'fired' event handler. Just put the code needed to play the sound straight to the event handler itself. It will work fine and causes minimal lag that way.

Another issue for you to think about is, how you treat the event handler when the unit leaves the trigger's zone. Will you delete the EH or just make a check to the event handler using a if...then statement to see if the unit is in the trigger's zone. The latter choice wouldn't cause much lag either, me thinks. But the point is, no need for scripts / non-BIS functions here.
« Last Edit: 30 Aug 2005, 22:16:41 by Baddo »

Offline Chammy

  • Members
  • *
  • I'm a llama!
Thanks guys, I 'm looking into it now, I lost alot of info earlier :(