Skip to content

Commit

Permalink
sound_something_wait -> sound_something_wait_with_block
Browse files Browse the repository at this point in the history
  • Loading branch information
lee committed Jan 7, 2025
1 parent a82ce6d commit 351518e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/playground/blocks/block_sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,12 @@ module.exports = {
script.playState = 1;
const instance = Entry.Utils.playSound(sound.id);
Entry.Utils.addSoundInstances(instance, sprite);
const duration = Math.floor(
(sound.duration * 1000) / Entry.playbackRateValue
);
setTimeout(() => {
script.playState = 0;
}, sound.duration * 1000);
}, duration);
}
return script;
} else if (script.playState == 1) {
Expand Down

0 comments on commit 351518e

Please sign in to comment.