设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2649|回复: 5
打印 上一主题 下一主题

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

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
47 小时
注册时间
2011-12-28
帖子
18
跳转到指定楼层
1
发表于 2014-5-17 04:18:41 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

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

点评

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

Lv1.梦旅人

史莱姆的信徒
12-B

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

点评

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

使用道具 举报

Lv1.梦旅人

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

使用道具 举报

Lv1.梦旅人

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

RUBY 代码复制
  1. #===============================================================================
  2. # More Self-Switches (VX Ace Edition)
  3. # Version 1.0
  4. # Author game_guy
  5. #-------------------------------------------------------------------------------
  6. # Intro:
  7. # Ever need more than 4 self switches? With this small script, you can now
  8. # have as many self switches you want. You aren't just limited to letters
  9. # either. You can have names for them.
  10. #
  11. # Features:
  12. # -More Self Switches
  13. # -Name them whatever
  14. #
  15. # Instructions:
  16. # -First, lets create a self switch for our event. Anywhere in the event, add
  17. # a comment and type this,
  18. # Switch:switch_name.
  19. # switch_name can be whatever you want to name the switch. Thats all you have
  20. # to do to create a self switch for that page.
  21. # There cannot be any spaces between the colon and the switch name.
  22. # e.g. Switch: switch - Does not work.
  23. # e.g. Switch:switch - Does work.
  24. #
  25. # -Now to turn this switch of or on, call this in a script call.
  26. # self_switch("switch", true/false)
  27. # switch is the switch name, this must be in double " " or single ' ' quotes.
  28. # true/false tells the script whether to turn it off or on. true = on,
  29. # false = off.
  30. #
  31. # -If you want to see if a self switch is on/off, use this script in a
  32. # condtional branch.
  33. # self_switch_state("switch") == true/false
  34. # switch is the switch name, this must be in double " " or single ' ' quotes.
  35. # true = on, false = off
  36. #
  37. # Compatibility:
  38. # Should work with anything.
  39. #
  40. # Credits:
  41. # game_guy ~ For creating it.
  42. #===============================================================================
  43.  
  44. class Game_Event < Game_Character
  45. alias gg_init_more_switches_lat initialize
  46. def initialize(map_id, event)
  47. gg_init_more_switches_lat(map_id, event)
  48. @event.pages.each {|page| page.list.each {|command|
  49. if [108, 408].include?(command.code)
  50. command.parameters.each {|p| check_custom_switch(page, p) }
  51. end}}
  52. refresh
  53. end
  54. def check_custom_switch(page, code)
  55. a = code.split(':')
  56. if !a[0].nil? && a[0].downcase == "switch" && a[1] != nil
  57. page.condition.self_switch_ch = a[1]
  58. page.condition.self_switch_valid = true
  59. end
  60. end
  61. end
  62.  
  63. class Game_Interpreter
  64. def self_switch(switch, state)
  65. if @event_id > 0
  66. key = [$game_map.map_id, @event_id, switch]
  67. $game_self_switches[key] = state
  68. end
  69. $game_map.need_refresh = true
  70. end
  71. def self_switch_state(switch)
  72. key = [$game_map.map_id, @event_id, switch]
  73. return $game_self_switches[key]
  74. end
  75. end
回复 支持 反对

使用道具 举报

Lv2.观梦者

无节操

梦石
0
星屑
607
在线时间
795 小时
注册时间
2009-2-6
帖子
3939

开拓者贵宾

5
发表于 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制作大师授权素材推广计划
回复 支持 反对

使用道具 举报

Lv4.逐梦者

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

开拓者

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

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

点评

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

评分

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

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-25 09:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表