Project1

标题: 请教有无关于条件分歧的脚本 [打印本页]

作者: sunset7395    时间: 2019-7-1 17:27
标题: 请教有无关于条件分歧的脚本
小弟脚本盲
设计一个抽卡游戏
因为数量太多
用事件分歧做得很蛋疼

我想要的是
随机变数1~100
若为1则打开1号开关
变数1号 +1
这样的可行吗?
作者: soulsaga    时间: 2019-7-1 19:39
本帖最后由 soulsaga 于 2019-7-1 19:46 编辑

随机数用事件..其他用脚本就行..
RUBY 代码复制
  1. $game_switches[$game_variables[随机数的变量ID]]=ture
  2. $game_variables[$game_variables[随机数的变量ID]]+=1

作者: sunset7395    时间: 2019-7-1 20:31
soulsaga 发表于 2019-7-1 19:39
随机数用事件..其他用脚本就行..$game_switches[$game_variables[随机数的变量ID]]=ture
$game_variables[$ ...

感谢!问题解决了!




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1