啊丹 发表于 2006-3-28 16:10:28

[FlyingSnow2000][投票演示]

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


未命名触发器 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)))
            触发器 - Run result <情报> (ignoring conditions)



未命名触发器 002
  事件
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
    对话 - A dialog button is clicked for dlg
  环境
  动作
    对话 - 隐藏 dlg[(Player number of (Triggering player))] for (Triggering player)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - 环境
        (Clicked dialog button) 等于 dif1[(Player number of (Triggering player))]
      Then - 动作
        Set mode = (mode + 1)
      Else - 动作
        Set mode = (mode - 1)




result
  事件
  环境
  动作
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - 环境
        mode 小于 0
      Then - 动作
        -------- 极限模式的代码 --------
      Else - 动作
        -------- 普通模式的代码 --------
页: [1]
查看完整版本: [FlyingSnow2000][投票演示]