OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MuSe on 12 Jul 2004, 12:06:03

Title: looking for some scripts....
Post 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.
Title: Re:looking for some scripts....
Post by: ponq on 12 Jul 2004, 12:11:53
2nd -> check Addeventhandler ["Fired","alarmsbase.sqs"].
Title: Re:looking for some scripts....
Post by: MuSe on 12 Jul 2004, 12:14:47
Hmm..... maybe i should have used that on my airfield raid mission saying as there are no silenced weapons being used.
Title: Re:looking for some scripts....
Post by: MuSe on 12 Jul 2004, 12:16:55
BTW is check the name of the unit?
Title: Re:looking for some scripts....
Post by: ponq on 12 Jul 2004, 12:22:02
no lol ;)

just look up the addeventhandler command at the online command reference here at ofpec.com (editors depot).
Title: Re:looking for some scripts....
Post by: dmakatra on 12 Jul 2004, 13:52:51
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: