audio::scale_speed()
audio helper: scale speed. BO3's decompiled scripts carry no docs for this one: the description is ours, from its name and use.
Signature
audio::scale_speed(x1, x2, y1, y2, z)
Needs #using the script that defines it (scripts/shared/audio_shared.csc).
Parameters
| Name |
|---|
| x1 |
| x2 |
| y1 |
| y2 |
| z |
The decompiled scripts don't keep default values, so some of these may be optional: check the real uses below.
Real uses in BO3's scripts
Called 49 times in the decompiled scripts. A few, zombies first:
- scripts/zm/zm_tomb_amb.csc, line 577
var_fef3a6cb = audio::scale_speed(21, 285, 0.01, 1, var_3ec2ad89); - scripts/zm/zm_tomb_capture_zones.csc, line 546
pitch = audio::scale_speed(0, 1, 0.8, 1.6, newval); - scripts/shared/audio_shared.csc, line 1025
volume = scale_speed(min_speed, max_speed, min_vol, max_vol, abs_speed); - scripts/shared/vehicles/_driving_fx.csc, line 674
volume = audio::scale_speed(0, maxspeed, 0, 1, curspeed); - scripts/mp/_helicopter_sounds.csc, line 753
run_volume = audio::scale_speed(self.idle_run_trans_speed, max_speed_vol, min_vol, max_vol, self.cur_speed);
More in audio::
- audio::playloopat()Plays loop at.
- audio::stoploopat()Stops loop at.
- audio::snd_set_snapshot()audio helper: sound set snapshot.
- audio::snd_play_auto_fx()audio helper: sound play auto FX.
- audio::unlockfrontendmusic()audio helper: unlock frontend music.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).