Project1

标题: 如何暂时禁止某脚本? [打印本页]

作者: heychen    时间: 2008-3-17 03:04
标题: 如何暂时禁止某脚本?
我的工程里新游戏就会要求让玩家先给角色取名字,然后才正式开始游戏。我也自己改了个在游戏窗口显示时间金钱的脚本。本来是想角色取好名字后进入正式游戏场景才出现的,结果现在选了“新游戏”后进入取名场景就出现了,我要怎么才能暂时禁止这个脚本,让游戏正常?


工程连接http://rpg.blue/upload_program/files/ceshi_86122694.rar
作者: 鑫森淼焱垚    时间: 2008-3-17 03:05
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-17 03:09
标题: 如何暂时禁止某脚本?
只有这个办法麽?
我在取名场景建立了一个自动事件,包括“取名要求”,和传送到正式地图,能不能在这个事件里添加一些语言实现??
作者: 鑫森淼焱垚    时间: 2008-3-17 03:11
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-17 03:18
标题: 如何暂时禁止某脚本?
晕,拉窗帘布麽。。。。。
作者: heychen    时间: 2008-3-17 04:32
标题: 如何暂时禁止某脚本?
晕,有达人帮帮我吗???
作者: 沉影不器    时间: 2008-3-17 04:37
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-17 04:41
标题: 如何暂时禁止某脚本?
class Scene_Map
def main
   @spriteset = Spriteset_Map.new
   @message_window = Window_Message.new
   @time_date_window = Window_daytime.new
   @gold_window = Window_Gold.new
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
  @gold_window.update
  @time_date_window.update
     if $scene != self
       break
     end # end if $scene != self
   end # end loop do
   Graphics.freeze
   @spriteset.dispose
   @message_window.dispose
   @time_date_window.dispose
   @gold_window.dispose
   if $scene.is_a?(Scene_Title)
     Graphics.transition
     Graphics.freeze
   end # end if $scene.is_a?(Scene_Title)
end # end def main
end # end class Scene_Map

###############################################################################
#显示日期时间
#变量1,2,3,4,5,6,7分别对应分,时,日,月,年,星期,季节
###############################################################################   

class Window_daytime < Window_Base
  def initialize
super(320, 0, 300, 100)#(X坐标,Y坐标,高,宽)
self.contents = Bitmap.new(width - 32, height - 32)
   $game_variables[1] = 1
   $game_variables[2] = 1
   $game_variables[3] = 1
   $game_variables[4] = 1
   $game_variables[5] = 1
   $game_variables[6] = 1
   $game_variables[7] = 1

refresh
   end # end def initialize

def refresh
@total_sec = Graphics.frame_count
   if @total_sec % 40 ==0
     $game_variables[1] += 1
   end # end if @total_sec % 40 ==0
   
   if $game_variables[1] >= 60 + 1
     $game_variables[1] = 1
     $game_variables[2] += 1
   end # end if $game_variables[1] >= 6 + 1
   
   if $game_variables[2] >= 24 + 1
     $game_variables[2] = 1
     $game_variables[3] += 1
     $game_variables[6] += 1
   end # end if $game_variables[2] >= 12 + 1
   
   if $game_variables[3] >= 30 + 1
     $game_variables[3] = 1
     $game_variables[4] += 1
     $game_variables[7] += 1
   end # end if $game_variables[3] >= 30 + 1

   if $game_variables[4] >= 12 + 1
     $game_variables[4] = 1
     $game_variables[5] += 1
   end # end if $game_variables[4] >= 12 + 1

   if $game_variables[6] >= 7 + 1
     $game_variables[6] = 1
   end # end if $game_variables[6] >= 7 + 1
     
   if $game_variables[7] >= 12 + 1
     $game_variables[7] = 1
   end # end if $game_variables[7] >= 7 + 1

text_min = [ "","00", "01", "02", "03", "04", "05", "06", "07",
             "08", "09", "10", "11", "12", "13", "14", "15",
             "16", "17", "18", "19", "20", "21", "22", "23",
             "24", "25", "26", "27", "28", "29", "30", "31",
             "32", "33", "34", "35", "36", "37", "38", "39",
             "40","41", "42", "43", "44", "45", "46", "47",
             "48", "49","50","51","52","53","54","55","56",
             "57", "58", "59"][$game_variables[1]]
            
text_hour = ["", "01:", "02:", "03:", "04:", "05:", "06:",
                "07:", "08:", "09:", "10:", "11:", "12:", "13:", "14:", "15:",
                "16:", "17:", "18:", "19:", "20:", "21:", "22:", "23:", "24:"
                ][$game_variables[2]]
text_day = ["", " 1号", " 2号", " 3号", " 4号", " 5号", " 6号",
               " 7号", " 8号", " 9号", "10号", "11号", "12号",
               "13号", "14号", "15号", "16号", "17号", "18号",
               "19号", "20号", "21号", "22号", "23号", "24号",
               "25号", "26号", "27号", "28号", "29号","30号"][$game_variables[3]]
text_week = [ "","星期一", "星期二", "星期三", "星期四", "星期五", "星期六",
                "星期日"][$game_variables[6]]
text_month = ["", " 1月", " 2月", " 3月", " 4月", " 5月", " 6月",
                  " 7月", " 8月", " 9月", "10月", "11月", "12月"][$game_variables[4]]

text_jijie = ["", "春", "春", "春", "夏", "夏", "夏", "秋",  "秋",
                  "秋", "冬", "冬", "冬"][$game_variables[7]]

text_year = ["", "2008年", "2009年", "2010年", "2011年", "2012年", "2013年",
                "2014年", "2015年", "2016年", "2017年", "2018年"][$game_variables[5]]


  self.contents.clear
  self.contents.draw_text(5, -5, 128, 32, text_year)
  self.contents.draw_text(70, -5, 128, 32, text_month)
  self.contents.draw_text(55, 20, 128, 32, text_day)
  self.contents.draw_text(100, 20, 128, 32, text_week)
  self.contents.draw_text(185, -5, 128, 32, text_hour)
  self.contents.draw_text(220, -5, 128, 32, text_min)
  self.contents.draw_text(230, 20, 128, 32, text_jijie)
end # end def refresh

def update
  super
     refresh

end # end def update

end# end class Window_daytime

###############################################################################
#显示金钱
###############################################################################
class Window_Gold < Window_daytime
  
def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(80, 40, 128, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(105, 40, 128, 32, $data_system.words.gold, 2)
  end
end



作者: Iselia雪    时间: 2008-3-17 04:41
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-17 04:46
标题: 如何暂时禁止某脚本?
真的只能加开关麽。。。。{/gg}
作者: Iselia雪    时间: 2008-3-17 04:52
提示: 作者被禁止或删除 内容自动屏蔽
作者: 沉影不器    时间: 2008-3-17 04:56
提示: 作者被禁止或删除 内容自动屏蔽
作者: 沉影不器    时间: 2008-3-17 05:00
提示: 作者被禁止或删除 内容自动屏蔽
作者: Iselia雪    时间: 2008-3-17 05:02
提示: 作者被禁止或删除 内容自动屏蔽
作者: 沉影不器    时间: 2008-3-17 05:09
提示: 作者被禁止或删除 内容自动屏蔽
作者: Iselia雪    时间: 2008-3-17 05:13
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-17 20:00
标题: 如何暂时禁止某脚本?
晕,还发现一个大问题,就是游戏画面被菜单之类的覆盖后再返回游戏画面脚本会重新计算。。怎么解决??
作者: heychen    时间: 2008-3-17 21:54
标题: 如何暂时禁止某脚本?
顶起,谁帮帮我啊
是什么原因啊????
作者: wy29    时间: 2008-3-17 22:56
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-18 00:15
标题: 如何暂时禁止某脚本?
{/ll}算是解决了。。。太感谢各位了
作者: 沉影不器    时间: 2008-3-18 00:15
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-18 00:21
标题: 如何暂时禁止某脚本?
LS的
貌似你的按下ESC后还是会重新计算啊。
作者: 沉影不器    时间: 2008-3-18 00:28
提示: 作者被禁止或删除 内容自动屏蔽
作者: heychen    时间: 2008-3-18 04:43
标题: 如何暂时禁止某脚本?
- -;那就算了。。问题解决了。谢谢各位的帮助




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