Page 1 of 1

Sound class changes

Posted: Thu Jan 14, 2016 2:54 am
by satoon101
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:

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')

Posted: Thu Jan 14, 2016 11:37 am
by iPlayer
What's the difference between WORLD_ENTITY_INDEX and SOUND_FROM_WORLD? Wouldn't SOUND_FROM_WORLD be ideologically better since otherwise it's not used anywhere?

Posted: Fri Jan 15, 2016 10:11 am
by satoon101
Thank you, I just forgot all about that constant. I will update shortly.