请选择 进入手机版 | 继续访问电脑版

 找回密码
 点一下
查看: 4991|回复: 0

[FlyingSnow2000][投票演示]

  [复制链接]
发表于 2006-3-28 16:10:28 | 显示全部楼层 |阅读模式
几个说明:
1)Dialog使用数组时,大小要设为你需要的数量,不能使用默认的1
2)5秒后对话框自动关闭,未选择的玩家做弃权处理。由于单人游戏中一旦出现对话框游戏自动暂停且无法恢复,所以5秒后自动关闭的功能无效,只能用于多人游戏。
看了演示,自己又重新试了一下,好像确实是可以,看来还是有误区哦??变量中,数组的大小要设为玩家数的,以前我都是设为1的(数值型之类的不会受1的影响的)。
我把新的投票演示重新发出来,不过这次就不出演示了,就贴一下T的代码吧,各位自己去转换罗:

[trigger]
未命名触发器 001
  事件
    时间 - Elapsed game time is 0.00 seconds
  环境
  动作
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - 动作
        对话 - Change the title of dlg[(Integer A)] to 请选择游戏难...
        对话 - Create a dialog button for dlg[(Integer A)] labelled 普通模式
        Set dif1[(Integer A)] = (Last created dialog Button)
        对话 - Create a dialog button for dlg[(Integer A)] labelled 极限模式
        Set dif2[(Integer A)] = (Last created dialog Button)
        对话 - 显示 dlg[(Integer A)] for (Player((Integer A)))
        Wait 5.00 seconds
        For each (Integer A) from 1 to 12, do (Actions)
          Loop - 动作
            对话 - 隐藏 dlg[(Integer A)] for (Player((Integer A)))
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 触发器 - Run result <情报> (ignoring conditions)
[/trigger]

[trigger]
未命名触发器 002
&#160; 事件
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[1]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[2]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[3]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[4]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[5]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[6]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[7]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[8]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[9]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[10]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[11]
&#160;&#160;&#160; 对话 - A dialog button is clicked for dlg[12]
&#160; 环境
&#160; 动作
&#160;&#160;&#160; 对话 - 隐藏 dlg[(Player number of (Triggering player))] for (Triggering player)
&#160;&#160;&#160; If (All Conditions are True) then do (Then Actions) else do (Else Actions)
&#160;&#160;&#160;&#160;&#160; If - 环境
&#160;&#160;&#160;&#160;&#160;&#160;&#160; (Clicked dialog button) 等于 dif1[(Player number of (Triggering player))]
&#160;&#160;&#160;&#160;&#160; Then - 动作
&#160;&#160;&#160;&#160;&#160;&#160;&#160; Set mode = (mode + 1)
&#160;&#160;&#160;&#160;&#160; Else - 动作
&#160;&#160;&#160;&#160;&#160;&#160;&#160; Set mode = (mode - 1)
[/trigger]


[trigger]
result
&#160; 事件
&#160; 环境
&#160; 动作
&#160;&#160;&#160; If (All Conditions are True) then do (Then Actions) else do (Else Actions)
&#160;&#160;&#160;&#160;&#160; If - 环境
&#160;&#160;&#160;&#160;&#160;&#160;&#160; mode 小于 0
&#160;&#160;&#160;&#160;&#160; Then - 动作
&#160;&#160;&#160;&#160;&#160;&#160;&#160; -------- 极限模式的代码 --------
&#160;&#160;&#160;&#160;&#160; Else - 动作
&#160;&#160;&#160;&#160;&#160;&#160;&#160; -------- 普通模式的代码 --------
[/trigger]

评分

参与人数 1威望 +6 收起 理由
alexries + 6

查看全部评分

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-3-29 10:16 , Processed in 0.085635 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表