OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MuSe on 12 Jul 2004, 12:06:03
-
First one:
A script that if a east soldier sees a dead east soldier he is changed to setbehaviour aware
Second one:
A script that triggers and event when a unit fires its weapon. Such as an M16 fired and enemy base alarm sounds.
-
2nd -> check Addeventhandler ["Fired","alarmsbase.sqs"].
-
Hmm..... maybe i should have used that on my airfield raid mission saying as there are no silenced weapons being used.
-
BTW is check the name of the unit?
-
no lol ;)
just look up the addeventhandler command at the online command reference here at ofpec.com (editors depot).
-
1) There's a script by LCD that does just that. Check it out in the scripting: beta testing board. It's kinda old so you have to scroll a bit.
2) I'd suggest doing this with an evenhandler, along with a hasweapon check and an array searching for the closest enemy. First had the fire eventhandler, check if anyone is in, say 100 meter distance (kinda silly if you shoot a round 5918312 miles away and they go on alert) and check if the weapon is a silenced weapon.
:beat: *Gets Shot* :beat: