View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000690 | Spring engine | General | public | 2007-11-20 16:19 | 2007-12-09 23:05 |
| Reporter | lurker | Assigned To | KDR_11k | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000690: [patch] get play_sound: gives the ability to play sounds from cob that aren't heard by everyone | ||||
| Description | 1) Adds a new get call, PLAY_SOUND, to play a sound that can be heard only by allies, enemy, in los, etc. 2) changes get health to allow a unit ID to be passed 3) adds a call to create() at the end of ReloadCOB | ||||
| Additional Information | GET PLAY_SOUND(sound number, volume, who hears the sound, where to play the sound) To set up sounds to use with GET PLAY_SOUND, put a function like this near the top of your bos: Sounds() { play-sound ("movement", 10); play-sound ("pew", 10); play-sound ("reporting", 10); } The sound number is based on the order the sounds appear, staring from 0. To call the songs by name, add #defines like this: Sounds() { play-sound ("movement", 10); #define movement 0 play-sound ("pew", 10); #define pew 1 play-sound ("reporting", 10); #define reporting 2 } To actually call the sound, you use a line such as this: GET PLAY_SOUND (pew, 655360); 1) sound number - as above 2) volume - similar to the volume for play-sound, more affecting the distance where it is audible than actual volume - given as a float multiplied by 65536 3) who hears the sound 0 = anyone with the unit in ALOS 1 = anyone with the unit in LOS 2 = anyone with the unit in ALOS or radar 3 = anyone with the unit in LOS or radar 4 = everyone 5 = the unit's allies 6 = the unit's team 7 = the unit's enemies 4) where to play the sound - if 0, the sound is played from the unit's position - if 1, the sound is played directly from the speakers, the same way unit replies are | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-11-20 16:19 | lurker | New Issue | |
| 2007-11-20 16:19 | lurker | File Added: play_sound.patch | |
| 2007-11-20 16:23 | lurker | Note Added: 0001451 | |
| 2007-11-20 16:23 | lurker | File Added: play_sound_fixed.patch | |
| 2007-11-20 16:35 | lurker | File Added: get_play_sound_demo.sd7 | |
| 2007-12-06 19:43 | tvo | Summary | get play_sound: gives the ability to play sounds from cob that aren't heard by everyone => [patch] get play_sound: gives the ability to play sounds from cob that aren't heard by everyone |
| 2007-12-09 23:03 | KDR_11k | Status | new => assigned |
| 2007-12-09 23:03 | KDR_11k | Assigned To | => KDR_11k |
| 2007-12-09 23:05 | KDR_11k | Status | assigned => resolved |
| 2007-12-09 23:05 | KDR_11k | Resolution | open => fixed |
| 2007-12-09 23:05 | KDR_11k | Note Added: 0001486 |