Previous topicNext topic
 Gameofmir Help
Help > 游戏引擎功能系统 > 功能操作命令 > 字符文本类 >
从文本里随机获取一组不相同的字符

GetRandomTexts 文件路径 获取数量 保存变量(不输入括号的变量,非自定义变量,如:S1) 保存实际获取数量的变量

[@Main]
#IF
#ACT
GetRandomTexts ..\QuestDiary\测试.txt 10 S1 N1
SENDMSG 6 在“测试.txt”文件里,随机获取10个不相同的字符,保存在变量S1~S10里面,实际获取到字符数量为:<$STR(N1)>
SENDMSG 6 S1=<$STR(S1)>
SENDMSG 6 S2=<$STR(S2)>
SENDMSG 6 S3=<$STR(S3)>
SENDMSG 6 S4=<$STR(S4)>
SENDMSG 6 S5=<$STR(S5)>
SENDMSG 6 S6=<$STR(S6)>
SENDMSG 6 S7=<$STR(S7)>
SENDMSG 6 S8=<$STR(S8)>
SENDMSG 6 S9=<$STR(S9)>
SENDMSG 6 S10=<$STR(S10)>