Project1
标题:
【专业伸手党】求改造重力脚本,使其可以用作跑酷类游戏
[打印本页]
作者:
一瞬间的幻觉
时间:
2013-3-4 20:06
标题:
【专业伸手党】求改造重力脚本,使其可以用作跑酷类游戏
重力脚本论坛里面有的。。。。貌似是那个VX的《我是小红点》
想做点改变,就是画面会慢慢卷动,如果主角跟不上节奏,被掉队到屏幕之外,就判断游戏结束
我试过用事件,但是好难啊,而且很卡,,,不知道是不是有办法用脚本做出这样的效果
1、横轴跑酷,画面随着难度的改变,慢慢由左向右卷动,人物只能向右跑,和跳跃等动作。
2、竖轴跑酷,类似《是男人就下一百层》,画面由下向上卷动,或者由上往下卷动,主角越过障碍物,在画面没有把你淹没之前,取得更多的分数
希望能有人接这个悬赏吧,分不多。。。。。意思意思
作者:
怪蜀黍
时间:
2013-3-4 20:07
这种脚本订制类的任务还是P叔来接好了,至于那个名称显示的任务比较简单,先看看有不有人接再说。
首先上范例:
(, 下载次数: 163)
上传
点击文件名下载附件
然后上两个截图,不要吐槽,P叔不会画岩浆!
(, 下载次数: 89)
上传
点击文件名下载附件
(, 下载次数: 93)
上传
点击文件名下载附件
最后把脚本也贴贴,不知道大家能否看懂:
[pre lang="ruby" line="1"]#==============================================================================
# ■ P叔的恐怖死亡系统(转载什么的请注明此脚本来自
www.66rpg.com
)
#------------------------------------------------------------------------------
# ●切换画面滚动模式:
# $game_map.scr_roll(滚动方向,滚动距离,滚动速度,缩进格数)
# 滚动方向:2、4、6、8分别对应下、左、右、上
# 滚动距离:地图有多宽或者有多高就写多少吧。
# 滚动速度:范围1-5,数字越大滚动越快。
# 缩进格数:默认为0,若要距离屏幕边缘n格就判定死亡则写n。
# ●停止画面滚动模式:
# $game_map.stop_roll
#==============================================================================
class Game_Map
COMMON_EV = 2 # 被屏幕压死后执行的公共事件ID
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
@screen = Game_Screen.new
@interpreter = Game_Interpreter.new(0, true)
@map_id = 0
@display_x = 0
@display_y = 0
@scene_mode = DEFAULT_MAP_MODE # 0为正常模式 1为重力模式
create_vehicles
@scroll_mode = false #【判定用】false为正常模式 true为画面滚动模式
@scroll_direction = 0 # 地图滚动方向
@indentation = 0 #【判定用】缩进格数
@graphics_width = Graphics.width # 屏幕宽度
@graphics_height = Graphics.height # 屏幕高度
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
refresh if $game_map.need_refresh
update_scroll
update_events
update_vehicles
update_parallax
judge_player_xy if @scroll_mode
@screen.update
end
#--------------------------------------------------------------------------
# ● 画面滚动模式判定
#--------------------------------------------------------------------------
def scroll_mode
return @scroll_mode
end
#--------------------------------------------------------------------------
# ● 画面滚动模式方向判定
#--------------------------------------------------------------------------
def scroll_direction
return @scroll_direction
end
#--------------------------------------------------------------------------
# ● 执行画面滚动模式命令
#--------------------------------------------------------------------------
def scr_roll(direction, distance, speed, indentation = 0)
@scroll_mode = true
@indentation = indentation * 32
start_scroll(direction, distance, speed)
end
#--------------------------------------------------------------------------
# ● 停止画面滚动模式命令
#--------------------------------------------------------------------------
def stop_roll
@scroll_rest = 0
end
#--------------------------------------------------------------------------
# ● 画面滚动模式压死判定
#--------------------------------------------------------------------------
def judge_player_xy
@indentation = 0 if @indentation == nil
if ($game_player.screen_x <= @indentation + 16 and @scroll_direction == 6) or
($game_player.screen_x >= @graphics_width - @indentation - 16 and @scroll_direction == 4) or
($game_player.screen_y <= @indentation + 32 and @scroll_direction == 2) or
($game_player.screen_y >= @graphics_height - @indentation and @scroll_direction == 8)
@scroll_mode = false
$game_temp.common_event_id = COMMON_EV
end
end
end
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● 处理滚动
#--------------------------------------------------------------------------
def update_scroll(last_real_x, last_real_y)
ax1 = $game_map.adjust_x(last_real_x)
ay1 = $game_map.adjust_y(last_real_y)
ax2 = $game_map.adjust_x(@real_x)
ay2 = $game_map.adjust_y(@real_y)
if ay2 > ay1 and ay2 > CENTER_Y
if $game_map.scroll_mode
$game_map.scroll_down(ay2 - ay1) unless [2,8].include?($game_map.scroll_direction)
else
$game_map.scroll_down(ay2 - ay1)
end
end
if ax2 < ax1 and ax2 < CENTER_X
if $game_map.scroll_mode
$game_map.scroll_left(ax1 - ax2) unless [4,6].include?($game_map.scroll_direction)
else
$game_map.scroll_left(ax1 - ax2)
end
end
if ax2 > ax1 and ax2 > CENTER_X
if $game_map.scroll_mode
$game_map.scroll_right(ax2 - ax1) unless [4,6].include?($game_map.scroll_direction)
else
$game_map.scroll_right(ax2 - ax1)
end
end
if ay2 < ay1 and ay2 < CENTER_Y
if $game_map.scroll_mode
$game_map.scroll_up(ay1 - ay2) unless [2,8].include?($game_map.scroll_direction)
else
$game_map.scroll_up(ay1 - ay2)
end
end
end
end [/pre]
作者:
一瞬间的幻觉
时间:
2013-3-5 17:19
谢谢P叔
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X5.0