rpg rpgmakerxp汉化破解版 xp怎么设置主角移动路线

rpg maker xp怎么让永远人物跟着主角走?_百度知道
rpg maker xp怎么让永远人物跟着主角走?
我有更好的答案
傻瓜版:设置事件:设置移动路线:靠近主角。这个比较简单
采纳率:14%
#==============================================================================# 本脚本来自,使用和转载请保留此信息#============================================================================== # ————————————————————————————————————# ▼▲▼ XRXS13. パーティ列车移动 ver.1.02 ▼▲▼# by fukuyama## Train_Actor## fukuyama@alles.or.jp# #module Train_Actor#是否使用停止跟随的方法,也就是说,这里false改为true的时候,如果TRANSPARENT_SWITCHES_INDEX#开关打开,跟随的人物就消失了(其实只是变成透明而已)TRANSPARENT_SWITCH = falseTRANSPARENT_SWITCHES_INDEX = 20#举例:第一个为true,第二个为20,则打开20号开关,后面的人都没了。#跟随人数的最大数目,可以更改为2、3什么的。TRAIN_ACTOR_SIZE_MAX = 4# 定数#Input::DOWN = 2#Input::LEFT = 4#Input::RIGHT = 6#Input::UP = 6DOWN_LEFT = 1DOWN_RIGHT = 3UP_LEFT = 7UP_RIGHT = 9JUMP = 5class Game_Party_Actor & Game_Characterdef initializesuper()@through = trueenddef setup(actor)# キャラクターのファイル名と色相を设定if actor != nil@character_name = actor.character_name@character_hue = actor.character_hueelse@character_name = &&@character_hue = 0end# 不透明度と合成方法を初期化@opacity = 255@blend_type = 0enddef screen_z(height = 0)if $game_player.x == @x and $game_player.y == @yreturn $game_player.screen_z(height) - 1endsuper(height)end#--------------------------------------------------------------------------# ● 下に移动# turn_enabled : その场での向き変更を许可するフラグ#--------------------------------------------------------------------------def move_down(turn_enabled = true)# 下を向くif turn_enabledturn_downend# 通行可能な场合if passable?(@x, @y, Input::DOWN)# 下を向くturn_down# 座标を更新@y += 1endend#--------------------------------------------------------------------------# ● 左に移动# turn_enabled : その场での向き変更を许可するフラグ#--------------------------------------------------------------------------def move_left(turn_enabled = true)# 左を向くif turn_enabledturn_leftend# 通行可能な场合if passable?(@x, @y, Input::LEFT)# 左を向くturn_left# 座标を更新@x -= 1endend#--------------------------------------------------------------------------# ● 右に移动# turn_enabled : その场での向き変更を许可するフラグ#--------------------------------------------------------------------------def move_right(turn_enabled = true)# 右を向くif turn_enabledturn_rightend# 通行可能な场合if passable?(@x, @y, Input::RIGHT)# 右を向くturn_right# 座标を更新@x += 1endend#--------------------------------------------------------------------------# ● 上に移动# turn_enabled : その场での向き変更を许可するフラグ#--------------------------------------------------------------------------def move_up(turn_enabled = true)# 上を向くif turn_enabledturn_upend# 通行可能な场合if passable?(@x, @y, Input::UP)# 上を向くturn_up# 座标を更新@y -= 1endend#--------------------------------------------------------------------------# ● 左下に移动#--------------------------------------------------------------------------def move_lower_left# 向き固定でない场合unless @direction_fix# 右向きだった场合は左を、上向きだった场合は下を向く@direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::UP ? Input::DOWN : @direction)end# 下→左、左→下 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::LEFT)) or(passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::DOWN))# 座标を更新@x -= 1@y += 1endend#--------------------------------------------------------------------------# ● 右下に移动#--------------------------------------------------------------------------def move_lower_right# 向き固定でない场合unless @direction_fix# 左向きだった场合は右を、上向きだった场合は下を向く@direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::UP ? Input::DOWN : @direction)end# 下→右、右→下 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or(passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::DOWN))# 座标を更新@x += 1@y += 1endend#--------------------------------------------------------------------------# ● 左上に移动#--------------------------------------------------------------------------def move_upper_left# 向き固定でない场合unless @direction_fix# 右向きだった场合は左を、下向きだった场合は上を向く@direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::DOWN ? Input::UP : @direction)end# 上→左、左→上 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or(passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP))# 座标を更新@x -= 1@y -= 1endend#--------------------------------------------------------------------------# ● 右上に移动#--------------------------------------------------------------------------def move_upper_right# 向き固定でない场合unless @direction_fix# 左向きだった场合は右を、下向きだった场合は上を向く@direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::DOWN ? Input::UP : @direction)end# 上→右、右→上 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or(passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP))# 座标を更新@x += 1@y -= 1endendattr_writer :move_speedattr_writer :step_animeendmodule Spriteset_Map_Moduledef setup_actor_character_sprites?return @setup_actor_character_sprites_flag != nilenddef setup_actor_character_sprites(characters)if !setup_actor_character_sprites?index_game_player = 0@character_sprites.each_index do |i|if @character_sprites[i].character.instance_of?(Game_Player)index_game_player = ibreakendendfor character in characters.reverse@character_sprites.unshift(Sprite_Character.new(@viewport1, character))end@setup_actor_character_sprites_flag = trueendendendmodule Scene_Map_Moduledef setup_actor_character_sprites(characters)@spriteset.setup_actor_character_sprites(characters)endendmodule Game_Party_Moduledef set_transparent_actors(transparent)@transparent = transparentenddef setup_actor_character_spritesif @characters == nil@characters = []for i in 1 ... TRAIN_ACTOR_SIZE_MAX@characters.push(Game_Party_Actor.new)endendfor i in 1 ... TRAIN_ACTOR_SIZE_MAX@characters[i - 1].setup(actors[i])endif $scene.class.method_defined?('setup_actor_character_sprites')$scene.setup_actor_character_sprites(@characters)endenddef update_party_actorssetup_actor_character_spritestransparent = $game_player.transparentif transparent == falseif TRANSPARENT_SWITCHtransparent = $game_switches[TRANSPARENT_SWITCHES_INDEX]endendfor character in @characterscharacter.transparent = transparentcharacter.move_speed = $game_player.move_speedcharacter.step_anime = $game_player.step_animecharacter.updateendenddef moveto_party_actors( x, y )setup_actor_character_spritesfor character in @characterscharacter.moveto( x, y )endif @move_list == nil@move_list = []endmove_list_setupenddef move_party_actorsif @move_list == nil@move_list = []move_list_setupend@move_list.each_index do |i|if @characters[i] != nilcase @move_list[i].typewhen Input::DOWN@characters[i].move_down(@move_list[i].args[0])when Input::LEFT@characters[i].move_left(@move_list[i].args[0])when Input::RIGHT@characters[i].move_right(@move_list[i].args[0])when Input::UP@characters[i].move_up(@move_list[i].args[0])when DOWN_LEFT@characters[i].move_lower_leftwhen DOWN_RIGHT@characters[i].move_lower_rightwhen UP_LEFT@characters[i].move_upper_leftwhen UP_RIGHT@characters[i].move_upper_rightwhen JUMP@characters[i].jump(@move_list[i].args[0],@move_list[i].args[1])endendendendclass Move_List_Elementdef initialize(type,args)@type = type@args = argsenddef type() return @type enddef args() return @args endenddef move_list_setupfor i in 0 .. TRAIN_ACTOR_SIZE_MAX@move_list[i] = nilendenddef add_move_list(type,*args)@move_list.unshift(Move_List_Element.new(type,args)).popenddef move_down_party_actors(turn_enabled = true)move_party_actorsadd_move_list(Input::DOWN,turn_enabled)enddef move_left_party_actors(turn_enabled = true)move_party_actorsadd_move_list(Input::LEFT,turn_enabled)enddef move_right_party_actors(turn_enabled = true)move_party_actorsadd_move_list(Input::RIGHT,turn_enabled)enddef move_up_party_actors(turn_enabled = true)move_party_actorsadd_move_list(Input::UP,turn_enabled)enddef move_lower_left_party_actorsmove_party_actorsadd_move_list(DOWN_LEFT)enddef move_lower_right_party_actorsmove_party_actorsadd_move_list(DOWN_RIGHT)enddef move_upper_left_party_actorsmove_party_actorsadd_move_list(UP_LEFT)enddef move_upper_right_party_actorsmove_party_actorsadd_move_list(UP_RIGHT)enddef jump_party_actors(x_plus, y_plus)move_party_actorsadd_move_list(JUMP,x_plus, y_plus)endendmodule Game_Player_Moduledef update$game_party.update_party_actorssuperenddef moveto( x, y )$game_party.moveto_party_actors( x, y )super( x, y )enddef move_down(turn_enabled = true)if passable?(@x, @y, Input::DOWN)$game_party.move_down_party_actors(turn_enabled)endsuper(turn_enabled)enddef move_left(turn_enabled = true)if passable?(@x, @y, Input::LEFT)$game_party.move_left_party_actors(turn_enabled)endsuper(turn_enabled)enddef move_right(turn_enabled = true)if passable?(@x, @y, Input::RIGHT)$game_party.move_right_party_actors(turn_enabled)endsuper(turn_enabled)enddef move_up(turn_enabled = true)if passable?(@x, @y, Input::UP)$game_party.move_up_party_actors(turn_enabled)endsuper(turn_enabled)enddef move_lower_left# 下→左、左→下 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::LEFT)) or(passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::DOWN))$game_party.move_lower_left_party_actorsendsuperenddef move_lower_right# 下→右、右→下 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or(passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::DOWN))$game_party.move_lower_right_party_actorsendsuperenddef move_upper_left# 上→左、左→上 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or(passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP))$game_party.move_upper_left_party_actorsendsuperenddef move_upper_right# 上→右、右→上 のどちらかのコースが通行可能な场合if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or(passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP))$game_party.move_upper_right_party_actorsendsuperenddef jump(x_plus, y_plus)# 新しい座标を计算new_x = @x + x_plusnew_y = @y + y_plus# 加算値が (0,0) の场合か、ジャンプ先が通行可能な场合if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0)$game_party.jump_party_actors(x_plus, y_plus)endsuper(x_plus, y_plus)endattr_reader :move_speedattr_reader :step_animeendend # module Train_Actorclass Game_Partyinclude Train_Actor::Game_Party_Moduleendclass Game_Playerinclude Train_Actor::Game_Player_Moduleendclass Spriteset_Mapinclude Train_Actor::Spriteset_Map_Moduleendclass Scene_Mapinclude Train_Actor::Scene_Map_Moduleend#==============================================================================# 本脚本来自,使用和转载请保留此信息#==============================================================================
为您推荐:
其他类似问题
您可能关注的内容
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。RPG MAKER XP怎么设定在一个地图屏幕范围内遇到敌人_百度知道
RPG MAKER XP怎么设定在一个地图屏幕范围内遇到敌人
如图.我只想在草地内遇敌肿么弄而且草地里不要全是敌人要有几率的那种啦!大神求解!!!!!!!!!!
我有更好的答案
LZ也在制作口袋妖怪游戏啊,我也是啊可以在草丛里设置几个移动事件,移动范围就在草丛里,接触到就遇敌或者在每个草丛里设置一个事件,百分之几的几率遇敌
采纳率:43%
这是VA,和主站的VA是同一个软件,不过主站的VA下载速度很慢,我就另外存了一个,VA自带区域遇敌,是个很实用的系统&但是这样说有显得我不服责任,我就想出了个办法:在数据库——图块里设定通行禁止就可以让那里没有怪了…………虽然很笨,但是确实能解决问题
本回答被网友采纳
用RPGmakerVXAce吧
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。rpg maker xp 如何换主角?_百度知道
rpg maker xp 如何换主角?
rpg maker xp 在游戏过程中如何换主角?就像生化危机3里JILL换CARLOS那样。
我有更好的答案
改变行走图可以达到更换外形的目的,如果队伍也要更换的话,就增减队员吧
采纳率:52%
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。做个健康向上的人&&滚去睡觉!这都几点了!投稿:1粉丝:12分享--dynmicweibozoneqqbaidu将视频贴到博客或论坛视频地址复制嵌入代码复制微信扫一扫分享收藏0硬币--稍后看马克一下~用手机看转移阵地~用或其他应用扫描二维码手机下视频请使用扫码若未安装客户端,可直接扫此码下载应用看过该视频的还喜欢正在加载...miniOFFrpgmakerxp怎么让主角进入新地图然后自动消失_百度知道
rpgmakerxp怎么让主角进入新地图然后自动消失
我有更好的答案
随便哪个地方创个事件,并行处理,设置移动路线:主角 透明on然后按你的想法来。
采纳率:83%
为您推荐:
其他类似问题
rpgmakerxp的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 rpg makerxp 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信