1 | function scr_talking_guardener |
2 | { |
3 | var voice_pitch = 0.25 |
4 | if (argument_count > 0) |
5 | voice_pitch = argument[0] |
6 | switch current_char |
7 | { |
8 | case " ": |
9 | case "*": |
10 | break |
11 | default: |
12 | var gardener_talknoise = snd_talk_axis |
13 | audio_sound_pitch(gardener_talknoise, voice_pitch) |
14 | audio_stop_sound(gardener_talknoise) |
15 | audio_play_sound(gardener_talknoise, 20, false) |
16 | } |
17 | |
18 | switch current_char |
19 | { |
20 | case ".": |
21 | case ",": |
22 | case "?": |
23 | case "!": |
24 | break |
25 | default: |
26 | can_talk = true |
27 | } |
28 | |
29 | } |