OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SGT_SAVAGE on 24 Jan 2005, 04:55:04
-
I was wondering how do you get the AI to honk the horn of the vehicle they are driving?
thanks :)
-
Well, the horn is actually a "weapon" that has no ammo. So I would think:
vehicle fire "weaponname"
would work. The actual names of the horns, taken from the bis's commented game config, are:
CarHorn
TruckHorn
SportCarHorn
There may be more horns in custom addons, or in o.pbo (the stuff added by OFP:R). However, this might work in the general case:
vehicle fire primaryweapon vehicle
Or perhaps:
vehicle fire (weapons vehicle select 0)
Of course, those likely won't work if the vehicle has real weapons too...
-
I'm not as bright as the Barron, so I recorded the horn and then used the sound file when I needed the sound.
-
If you use playsound, it can work as well. If you need a horn sound, just depbo the resistance campaign, and grab the sound from the first mission :)
Good luck!