查看: 4530|回复: 10

[已经解决] 关于Khas的烛光系统的一个问题

[复制链接]
梦石
0
星屑
50
在线时间
57 小时
注册时间
2012-9-1
回帖
24
发表于 2013-3-29 08:04:30 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 huhumaru 于 2013-3-29 10:27 编辑

这个系统不是日站的半生@Page(仮)的那个系统。
我搜索了下,论坛貌似还没人用这个系统,这个系统是刚出的,下载地址见rpgmakervxace贴吧首页的精华帖(抱歉我的权限不够发链接)
个人感觉比半生@Page(仮)的那个系统效果更逼真。
我想问的是采用s = $game_map.effect_surface语句打开夜间模式后如何关闭。
梦石
0
星屑
195
在线时间
151 小时
注册时间
2013-1-1
回帖
46
发表于 2013-3-29 08:50:06 | 显示全部楼层
[pre lang="ruby" line="1"]s = $game_map.effect_surface[/pre]
这句本身只是将 $game_map.effect_surface 代入 s 这个变量,并没有打开什么夜间模式啊..

下面是脚本里关于effect_surface的说明,或者对你有用
[pre lang="ruby" line="1"]#-------------------------------------------------------------------------------
# * Instructions - 4. Use the effect's surface!
#-------------------------------------------------------------------------------
# The Awesome Light Effects draws the effects on a surface. In order to make
# the effects visible, the effect's surface MUST be visible. The Effect's
# Surface is initialized with it's opacity set to zero. You can call the
# following commands:
#
# s = $game_map.effect_surface
# Gets the Effect's Surface into a variable
#
# s.set_color(r,g,b)
# Changes the Effect's Surface color instantly, where:
# r => red level;
# g => green level;
# b => blue level;
#
# s.set_alpha(a)
# Changes the Effect's Surface opacity instantly to a.
#
# s.change_color(time,r,g,b)
# Changes the Effect's Surface color ONLY in a certain time, where:
# time => The change's time (frames);
# r => red level;
# g => green level;
# b => blue level;
#
# s.change_color(time,r,g,b,a)
# Changes the Effect's Surface color and it's opacity in a certain time, where:
# time => The change's time (frames);
# r => red level;
# g => green level;
# b => blue level;
# a => opacity
#
# s.change_alpha(time,a)
# Changes the Effect's Surface opacity in a certain time, where:
# time => The change's time (frames);
# a => opacity[/pre]
回复

使用道具 举报

梦石
0
星屑
50
在线时间
57 小时
注册时间
2012-9-1
回帖
24
 楼主| 发表于 2013-3-29 09:02:47 | 显示全部楼层
六百木 发表于 2013-3-29 08:50
s = $game_map.effect_surface[/pre]
这句本身只是将 $game_map.effect_surface 代入 s 这个变量,并没有打 ...

那有什么方法可以移除这个变量呢?我刚接触RPG制作,不太懂脚本。
回复

使用道具 举报

梦石
0
星屑
50
在线时间
57 小时
注册时间
2012-9-1
回帖
24
 楼主| 发表于 2013-3-29 09:03:57 | 显示全部楼层
六百木 发表于 2013-3-29 08:50
s = $game_map.effect_surface[/pre]
这句本身只是将 $game_map.effect_surface 代入 s 这个变量,并没有打 ...

上面的代码只是提到如何改变S这个变量的属性,比如颜色透明度等
回复

使用道具 举报

梦石
0
星屑
195
在线时间
151 小时
注册时间
2013-1-1
回帖
46
发表于 2013-3-29 09:16:11 | 显示全部楼层
那你现在是如何打开夜间模式的?肯定不只是 s = $game_map.effect_surface 这句
回复

使用道具 举报

梦石
0
星屑
195
在线时间
151 小时
注册时间
2013-1-1
回帖
46
发表于 2013-3-29 09:22:48 | 显示全部楼层
如果你是想达到关闭灯光效果的目的,可以将effect_surface的alpha降到0,也就是不再造成任何遮罩
可以用如下脚本语句:
[pre lang="ruby" line="1"]s = $game_map.effect_surface
s.change_alpha(120, 0)[/pre]
其中第一个参数是过渡时间,这里就是120帧
第二个参数是alpha
回复

使用道具 举报

梦石
0
星屑
50
在线时间
57 小时
注册时间
2012-9-1
回帖
24
 楼主| 发表于 2013-3-29 09:32:12 | 显示全部楼层
六百木 发表于 2013-3-29 09:22
如果你是想达到关闭灯光效果的目的,可以将effect_surface的alpha降到0,也就是不再造成任何遮罩
可以用如 ...

这个我也试过,是有效果,但是这个时候S这个变量还在,仍然要和我用的另一个脚本起冲突。
难道真要放弃其中的一个么QAQ
回复

使用道具 举报

梦石
0
星屑
50
在线时间
57 小时
注册时间
2012-9-1
回帖
24
 楼主| 发表于 2013-3-29 09:33:15 | 显示全部楼层
两个脚本都不打开或者只打开其中的一个的时候不起冲突,同时开就有问题,所以我的想法是需要烛光的时候打开烛光,不需要的时候关闭
回复

使用道具 举报

梦石
0
星屑
50
在线时间
57 小时
注册时间
2012-9-1
回帖
24
 楼主| 发表于 2013-3-29 09:34:45 | 显示全部楼层
六百木 发表于 2013-3-29 09:16
那你现在是如何打开夜间模式的?肯定不只是 s = $game_map.effect_surface 这句

s = $game_map.effect_surface
s.change_color(1,0,0,0,220)
回复

使用道具 举报

梦石
0
星屑
195
在线时间
151 小时
注册时间
2013-1-1
回帖
46
发表于 2013-3-29 09:37:26 | 显示全部楼层
s 只是个临时的局部变量啊..怎么个起冲突法?你把 s 改成 r 或者是 t 或者其他符合ruby局部变量命名规范的东西都行

你另一个脚本是啥?同时开的时候是啥问题?
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部