查看: 3072|回复: 5

[已经解决] 请问独立开关和地图事件的问题

[复制链接]
梦石
0
星屑
50
在线时间
47 小时
注册时间
2011-12-28
回帖
14
发表于 2014-5-17 04:18:41 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 bear001 于 2014-5-17 04:30 编辑

请问独立开关能否修改成更多选择吗?
另外弱弱的问一下请问游戏进行中时有什么方法把某个地图事件自动完全删除掉,不能用事件页切换成隐形那种因为可能在一样的地方生成其他事件。。(怕重置)

点评

一样的地方生成其他事件是什么意思?  发表于 2014-5-17 07:57

史莱姆的信徒
12-B

梦石
0
星屑
53
在线时间
368 小时
注册时间
2013-8-14
回帖
909
发表于 2014-5-17 08:26:57 来自手机 | 显示全部楼层
好像小海龟有拓展独立开关的脚本,善用搜索?
在编辑器内实现可视删除大概不行,但是你可以创建一个事件在他旁边,我等凡夫俗子看不出这有什么影响。

点评

找不到。。。  发表于 2014-5-17 18:01
現在不能搜索了......  发表于 2014-5-17 09:41
回复

使用道具 举报

梦石
0
星屑
50
在线时间
47 小时
注册时间
2011-12-28
回帖
14
 楼主| 发表于 2014-5-17 11:54:02 | 显示全部楼层
就是地图事件A变成地图事件B。。。
   我会想要这方法是因为我用了XAS脚本,然后我想做个能随机生成XAS敌人事件之后我发现XAS敌人打死过后无法消除。。。
回复

使用道具 举报

梦石
0
星屑
50
在线时间
47 小时
注册时间
2011-12-28
回帖
14
 楼主| 发表于 2014-5-17 18:11:38 | 显示全部楼层
现在我找到了一个英文版的扩展独立开关研究了很久不懂怎么用
有哪位大大能帮帮忙吗。。。。。

[pre lang="ruby" line="1"]#===============================================================================
# More Self-Switches (VX Ace Edition)
# Version 1.0
# Author game_guy
#-------------------------------------------------------------------------------
# Intro:
# Ever need more than 4 self switches? With this small script, you can now
# have as many self switches you want. You aren't just limited to letters
# either. You can have names for them.
#
# Features:
# -More Self Switches
# -Name them whatever
#
# Instructions:
# -First, lets create a self switch for our event. Anywhere in the event, add
# a comment and type this,
# Switch:switch_name.
# switch_name can be whatever you want to name the switch. Thats all you have
# to do to create a self switch for that page.
# There cannot be any spaces between the colon and the switch name.
# e.g. Switch: switch - Does not work.
# e.g. Switch:switch - Does work.
#
# -Now to turn this switch of or on, call this in a script call.
# self_switch("switch", true/false)
# switch is the switch name, this must be in double " " or single ' ' quotes.
# true/false tells the script whether to turn it off or on. true = on,
# false = off.
#
# -If you want to see if a self switch is on/off, use this script in a
# condtional branch.
# self_switch_state("switch") == true/false
# switch is the switch name, this must be in double " " or single ' ' quotes.
# true = on, false = off
#
# Compatibility:
# Should work with anything.
#
# Credits:
# game_guy ~ For creating it.
#===============================================================================

class Game_Event < Game_Character
alias gg_init_more_switches_lat initialize
def initialize(map_id, event)
gg_init_more_switches_lat(map_id, event)
@event.pages.each {|page| page.list.each {|command|
if [108, 408].include?(command.code)
command.parameters.each {|p| check_custom_switch(page, p) }
end}}
refresh
end
def check_custom_switch(page, code)
a = code.split(':')
if !a[0].nil? && a[0].downcase == "switch" && a[1] != nil
page.condition.self_switch_ch = a[1]
page.condition.self_switch_valid = true
end
end
end

class Game_Interpreter
def self_switch(switch, state)
if @event_id > 0
key = [$game_map.map_id, @event_id, switch]
$game_self_switches[key] = state
end
$game_map.need_refresh = true
end
def self_switch_state(switch)
key = [$game_map.map_id, @event_id, switch]
return $game_self_switches[key]
end
end[/pre]
回复

使用道具 举报

无节操

梦石
0
星屑
608
在线时间
795 小时
注册时间
2009-2-6
回帖
3910

开拓者贵宾

发表于 2014-5-17 20:17:17 | 显示全部楼层
bear001 发表于 2014-5-17 18:11
现在我找到了一个英文版的扩展独立开关研究了很久不懂怎么用
有哪位大大能帮帮忙吗。。。。。

使用注释功能,在注释中写入
  1. Switch:switch_name
复制代码
来新建一个独立开关,中间不能有空格
使用脚本功能,用下面的方法开关这个开关
  1. self_switch("switch_name", true)
  2. self_switch("switch_name", false)
复制代码
任何需要判断的时候,使用脚本的
  1. self_switch_state("switch_name")
复制代码
获取开关的状态。

点评

终于解决了谢谢moy大大。。。。  发表于 2014-5-17 22:26
moy
顺便一提,我觉得在线翻译能帮到你……虽然翻译经常卖萌  发表于 2014-5-17 20:19

评分

参与人数 1梦石 +1 收起 理由
taroxd + 1 认可答案

查看全部评分

Brandnew day, Brandnew Life
                             规 实在  中
暂为素材区版主,版其  琢磨
应援一下~
RPG制作大师授权素材推广计划
回复

使用道具 举报

梦石
2
星屑
5550
在线时间
2566 小时
注册时间
2012-2-9
回帖
947

开拓者

发表于 2014-5-17 20:17:25 | 显示全部楼层
如果独立开关太少,就给这个事件设置一个变量。变量初始值设置大一点,每-1,该事件向下进行一个事件页。

你还可以用这一个变量控制整个游戏的流程,控制整个游戏的所有事件。

点评

也谢谢你的建议。。。关于扩展独立开关的功能我用了上面的脚本已经解决了  发表于 2014-5-17 22:35

评分

参与人数 1星屑 +100 收起 理由
taroxd + 100 认可答案

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部