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

Project1

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

[已经解决] 【专业伸手党】求改造重力脚本,使其可以用作跑酷类游戏

[复制链接]

Lv1.梦旅人

梦石
0
星屑
239
在线时间
2399 小时
注册时间
2008-4-11
帖子
12326

贵宾第6届短篇游戏比赛季军

跳转到指定楼层
1
 楼主| 发表于 2013-3-4 20:06:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
5星屑
重力脚本论坛里面有的。。。。貌似是那个VX的《我是小红点》

想做点改变,就是画面会慢慢卷动,如果主角跟不上节奏,被掉队到屏幕之外,就判断游戏结束

我试过用事件,但是好难啊,而且很卡,,,不知道是不是有办法用脚本做出这样的效果

1、横轴跑酷,画面随着难度的改变,慢慢由左向右卷动,人物只能向右跑,和跳跃等动作。

2、竖轴跑酷,类似《是男人就下一百层》,画面由下向上卷动,或者由上往下卷动,主角越过障碍物,在画面没有把你淹没之前,取得更多的分数



希望能有人接这个悬赏吧,分不多。。。。。意思意思

最佳答案

查看完整内容

这种脚本订制类的任务还是P叔来接好了,至于那个名称显示的任务比较简单,先看看有不有人接再说。 首先上范例: 然后上两个截图,不要吐槽,P叔不会画岩浆! 最后把脚本也贴贴,不知道大家能否看懂: #============================================================================== # ■ P叔的恐怖死亡系统(转载什么的请注明此脚本来自www.66rpg.com) #------------------------- ...

点评

乍一看,或许用事件脚本可以解决的说……  发表于 2013-3-4 22:57
这个用事件绝对会卡到爆吧…… = =|  发表于 2013-3-4 21:06

Lv3.寻梦者 (版主)

八宝粥的基叔

梦石
0
星屑
4514
在线时间
5228 小时
注册时间
2009-4-29
帖子
14318

贵宾

来自 2楼
发表于 2013-3-4 20:07:00 | 只看该作者
这种脚本订制类的任务还是P叔来接好了,至于那个名称显示的任务比较简单,先看看有不有人接再说。
首先上范例: 重力系统_范例.rar (260.24 KB, 下载次数: 163)
然后上两个截图,不要吐槽,P叔不会画岩浆!


最后把脚本也贴贴,不知道大家能否看懂:
RUBY 代码复制
  1. #==============================================================================
  2. # ■ P叔的恐怖死亡系统(转载什么的请注明此脚本来自[url]www.66rpg.com[/url])
  3. #------------------------------------------------------------------------------
  4. # ●切换画面滚动模式:
  5. #   $game_map.scr_roll(滚动方向,滚动距离,滚动速度,缩进格数)
  6. #   滚动方向:2、4、6、8分别对应下、左、右、上
  7. #   滚动距离:地图有多宽或者有多高就写多少吧。
  8. #   滚动速度:范围1-5,数字越大滚动越快。
  9. #   缩进格数:默认为0,若要距离屏幕边缘n格就判定死亡则写n。
  10. # ●停止画面滚动模式:
  11. #   $game_map.stop_roll
  12. #==============================================================================
  13.  
  14. class Game_Map
  15.   COMMON_EV = 2   # 被屏幕压死后执行的公共事件ID      
  16.   #--------------------------------------------------------------------------
  17.   # ● 初始化对象
  18.   #--------------------------------------------------------------------------
  19.   def initialize
  20.     @screen = Game_Screen.new
  21.     @interpreter = Game_Interpreter.new(0, true)
  22.     @map_id = 0
  23.     @display_x = 0
  24.     @display_y = 0
  25.     @scene_mode = DEFAULT_MAP_MODE     # 0为正常模式 1为重力模式
  26.     create_vehicles
  27.     @scroll_mode = false               #【判定用】false为正常模式 true为画面滚动模式
  28.     @scroll_direction = 0              # 地图滚动方向
  29.     @indentation = 0                   #【判定用】缩进格数
  30.     @graphics_width = Graphics.width   # 屏幕宽度
  31.     @graphics_height = Graphics.height # 屏幕高度
  32.   end
  33.   #--------------------------------------------------------------------------
  34.   # ● 刷新画面
  35.   #--------------------------------------------------------------------------
  36.   def update
  37.     refresh if $game_map.need_refresh
  38.     update_scroll
  39.     update_events
  40.     update_vehicles
  41.     update_parallax
  42.     judge_player_xy if @scroll_mode
  43.     @screen.update
  44.   end
  45.   #--------------------------------------------------------------------------
  46.   # ● 画面滚动模式判定
  47.   #--------------------------------------------------------------------------
  48.   def scroll_mode
  49.     return @scroll_mode
  50.   end
  51.   #--------------------------------------------------------------------------
  52.   # ● 画面滚动模式方向判定
  53.   #--------------------------------------------------------------------------
  54.   def scroll_direction
  55.     return @scroll_direction
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 执行画面滚动模式命令
  59.   #--------------------------------------------------------------------------
  60.   def scr_roll(direction, distance, speed, indentation = 0)
  61.     @scroll_mode = true
  62.     @indentation = indentation * 32
  63.     start_scroll(direction, distance, speed)
  64.   end  
  65.   #--------------------------------------------------------------------------
  66.   # ● 停止画面滚动模式命令
  67.   #--------------------------------------------------------------------------
  68.   def stop_roll
  69.     @scroll_rest = 0
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 画面滚动模式压死判定
  73.   #--------------------------------------------------------------------------
  74.   def judge_player_xy
  75.     @indentation = 0 if @indentation == nil
  76.     if ($game_player.screen_x <= @indentation + 16 and @scroll_direction == 6) or
  77.       ($game_player.screen_x >= @graphics_width - @indentation - 16 and @scroll_direction == 4) or
  78.       ($game_player.screen_y <= @indentation + 32 and @scroll_direction == 2) or
  79.       ($game_player.screen_y >= @graphics_height - @indentation and @scroll_direction == 8)
  80.         @scroll_mode = false
  81.         $game_temp.common_event_id = COMMON_EV
  82.     end   
  83.   end  
  84. end  
  85.  
  86.  
  87. class Game_Player < Game_Character
  88.   #--------------------------------------------------------------------------
  89.   # ● 处理滚动
  90.   #--------------------------------------------------------------------------
  91.   def update_scroll(last_real_x, last_real_y)
  92.     ax1 = $game_map.adjust_x(last_real_x)
  93.     ay1 = $game_map.adjust_y(last_real_y)
  94.     ax2 = $game_map.adjust_x(@real_x)
  95.     ay2 = $game_map.adjust_y(@real_y)
  96.     if ay2 > ay1 and ay2 > CENTER_Y
  97.       if $game_map.scroll_mode
  98.         $game_map.scroll_down(ay2 - ay1) unless [2,8].include?($game_map.scroll_direction)
  99.       else   
  100.         $game_map.scroll_down(ay2 - ay1)
  101.       end  
  102.     end
  103.     if ax2 < ax1 and ax2 < CENTER_X
  104.       if $game_map.scroll_mode
  105.         $game_map.scroll_left(ax1 - ax2) unless [4,6].include?($game_map.scroll_direction)
  106.       else
  107.         $game_map.scroll_left(ax1 - ax2)
  108.       end
  109.     end
  110.     if ax2 > ax1 and ax2 > CENTER_X
  111.       if $game_map.scroll_mode
  112.         $game_map.scroll_right(ax2 - ax1) unless [4,6].include?($game_map.scroll_direction)
  113.       else
  114.         $game_map.scroll_right(ax2 - ax1)
  115.       end
  116.     end
  117.     if ay2 < ay1 and ay2 < CENTER_Y
  118.       if $game_map.scroll_mode
  119.         $game_map.scroll_up(ay1 - ay2) unless [2,8].include?($game_map.scroll_direction)
  120.       else
  121.         $game_map.scroll_up(ay1 - ay2)
  122.       end
  123.     end
  124.   end
  125. end

点评

那是个bug  发表于 2015-11-22 08:42
发现跳到最上方就会死亡,是一个BUG吗?也许是错觉?  发表于 2015-11-20 20:08
能做出类似滑雪大冒险游戏的效果吗?  发表于 2013-5-25 21:09
P叔威武...  发表于 2013-3-5 19:26
《逝去的回忆3:四叶草之梦》真情发布,欢迎点击图片下载试玩喵。

《逝去的回忆3》的讨论群:
一群:192885514
二群:200460747
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
239
在线时间
2399 小时
注册时间
2008-4-11
帖子
12326

贵宾第6届短篇游戏比赛季军

3
 楼主| 发表于 2013-3-5 17:19:47 | 只看该作者
谢谢P叔
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-15 04:48

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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