Project1
标题:
呑食天地,求一简单脚本
[打印本页]
作者:
rpgyuzeng
时间:
2009-7-8 12:43
提示:
作者被禁止或删除 内容自动屏蔽
作者:
rpgyuzeng
时间:
2009-7-8 12:53
提示:
作者被禁止或删除 内容自动屏蔽
作者:
雪流星
时间:
2009-7-8 18:41
本帖最后由 雪流星 于 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
复制代码
作者:
rpgyuzeng
时间:
2009-7-8 22:12
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1