Created
June 6, 2019 17:22
-
-
Save IosysPio/d25bae781dd55908328e256f9b4d6b29 to your computer and use it in GitHub Desktop.
VCIで複数の音声の中から1つをランダムに再生する例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_VA = vci.assets | |
sCount = 3 --- 音声ファイルの個数 | |
--- | |
function onUse(self) | |
--- グリップしたときに実行される | |
local num = math.random(sCount) --- 最大値がsCountの乱数発生 | |
_VA._ALL_PlayAudioFromIndex(num) --- num番目の音声を再生 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment