OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SGT_SAVAGE on 24 Jan 2005, 04:55:04

Title: Honk Yer Horn
Post 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  :)
Title: Re:Honk Yer Horn
Post by: General Barron on 24 Jan 2005, 06:18:37
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...
Title: Re:Honk Yer Horn
Post by: The-Architect on 24 Jan 2005, 22:28:23
I'm not as bright as the Barron, so I recorded the horn and then used the sound file when I needed the sound.
Title: Re:Honk Yer Horn
Post by: Silencer on 24 Jan 2005, 23:43:30
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!