How to give unique sounds for horses?

正在查看此主题的用户

Furok

Knight at Arms
As I know, all sounds of horses in MnB have no markers, what exact horse will use it. Just a horse. All horses in game.

What ways exists to give different sounds for different horses?
Or it hardcoded?
 
I'm afraid I don't know the exact functions you would use to make this happen, but I think I have a fairly good idea of how the coding works.

Could you tie the sound to the rider instead of the horse? Give a random chance of a neigh coming from a rider with the condition that he is still mounted. Possibly trigger a dying sound when the mount is killed. Is that a possibility?

I can't think of a good way to replace the hoof beats, however. Those are a bit more complicated and are tied to the speed of the horse so it wouldn't be easy to replace a light clip-clop with heavier hoof beats.
 
agent_get_animation should work properly for this version (although it hasn't been tested for horses). You can check for the appropriate horse_pace animations, and then play the sound  - set up an agent slot system for delays or something and you're good to go - might want to disable arf_make_walk_sound in module_animation or swap/blank out the default horse sounds.
 
后退
顶部 底部