Warcraft III resources & community, 2003–2006 · archived

How to make trigger ...

3 posts
#1

How to make trigger ...

Tell me please, how to make trigger where:
- When unit does something (attacks, or maybe dies) there is local sound. But not just local sound, i need random. For example i need to have he shoots and you hear random sound from 5 different shot sounds that you uploaded to your map.
How to make random local sound ? :?:
#2
assuming you already know how to PLAY the sound, define a Sound type variable that is an Array, and index all your sounds into slots (0,1,etc), then pick a random number from 0 to (max) to play them.
#3
Also, get random number for ALL players, and then play sound with that number only for local player (or face desyncs)