Sound class changes
Posted: Thu Jan 14, 2016 2:54 am
We decided to update the Sound class a little to match the other recipient classes. Now, you no longer pass recipients when creating an instance. Passing recipients is now solely handled in the play method.
Also, we swapped the index and sample arguments and gave index a default value. From now on, to get an instance, the only required argument is the sample (sound path).
Previously:
Now:
Also, we swapped the index and sample arguments and gave index a default value. From now on, to get an instance, the only required argument is the sample (sound path).
Previously:
Syntax: Select all
# Use parentheses to denote no recipients
# Pass the WORLD_ENTITY_INDEX index
Sound((), 0, 'my/sound/path.mp3')
Now:
Syntax: Select all
Sound('my/sound/path.mp3')