赞 | 5 |
VIP | 71 |
好人卡 | 22 |
积分 | 6 |
经验 | 32145 |
最后登录 | 2013-8-9 |
在线时间 | 184 小时 |
Lv2.观梦者 天仙
- 梦石
- 0
- 星屑
- 620
- 在线时间
- 184 小时
- 注册时间
- 2008-4-15
- 帖子
- 5023
|
本帖最后由 雪流星 于 2009-7-8 04:49 编辑
在事件中插入腳本: name_choice
自動生成選擇項
- class Game_Message
- attr_accessor :name_choice # bool
- alias tunshi_initialize initialize
- def initialize
- tunshi_initialize
- name_choice = false
- end
- end
- class Window_Message < Window_Selectable
- alias tunshi_convert_special_characters convert_special_characters
- def convert_special_characters
- tunshi_convert_special_characters
- @text.gsub!(/\\P\[([0-9]+)\]/i) { $game_party.members[$1.to_i].name }
- end
- alias tunshi_input_choice input_choice
- def input_choice
- if $game_message.name_choice
- if Input.trigger?(Input::C)
- Sound.play_decision
- $game_party.remove_actor($game_party.members[@index].id)
- $game_message.name_choice = false
- end
- end
- tunshi_input_choice
- end
- end
- class Game_Interpreter
- def name_choice
- if $game_party.members.size == 1
- $game_message.texts.push("\\c[10]隊伍僅剩一人")
- return
- end
- names = []
- for n in $game_party.members
- names.push(n.name)
- end
- @params =[names, $game_party.members.size]
- command_102
- $game_message.name_choice = true
- end
- end
复制代码 |
|