if @active_battler.is_a?(Game_Enemy)
if @active_battler.restriction == 3
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
#======== here is the setting for the movement & animation...
x = target.screen_x - RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/6
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
@spriteset.enemy_sprites[@active_battler.index].move(x, target.screen_y, 10)
#========= here if you look at the RPG's movement settings you'll see
#========= that he takes the number 40 for the speed of the animation...
#========= i thing thats too fast so i settet it down to 10 so looks smoother...
end
if @active_battler.is_a?(Game_Actor)
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
#======= the same thing for the player... ^-^
x = target.screen_x + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/8
@spriteset.actor_sprites[@active_battler.index].pose(0)
@spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10)
end
if @active_battler.is_a?(Game_Enemy)
if @active_battler.restriction == 3
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
y = target.screen_y - RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).height/10#这是除以敌人战斗图的行数+2(这样就会显示在上方),我是在默认脚本里改的,LZ就以自己的实际情况而定
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
@spriteset.enemy_sprites[@active_battler.index].move(target.screen_x, y, 10) #如果需要调整位置的话就在这里的x,y上加减
end
if @active_battler.is_a?(Game_Actor)
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
y = target.screen_y + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).height/12 #这是除以角色战斗图的行数-2(这样就会显示在下方
@spriteset.actor_sprites[@active_battler.index].pose(0)
@spriteset.actor_sprites[@active_battler.index].move(target.screen_x, y, 10)#同上
end
| 欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |