以下引用幻耶于2008-6-16 20:27:19的发言:
以下引用幻耶于2008-6-16 20:48:32的发言:
错在哪里总可以说吧
以下引用dbshy于2008-6-16 21:01:00的发言:
以下引用link006007于2008-6-16 20:52:40的发言:
你先试试吧
Sprite_Pet 里面
def initialize(viewport, father_id = 0)
super(viewport)
@father_id = 0
if $game_party.actors[father_id] != nil
if $game_party.actors[father_id].pet_id != 0
@father_id = $game_party.actors[father_id].id
@battler = Game_Pet.new($game_party.actors[father_id].pet_id,
@father_id)
else
def update
... ...
# 设置活动块的坐标
self.x = $game_party.actors.index($game_actors[@father_id]) * 160 + 85
class Game_Pet < Game_Battler
def movable?
return (not @hidden and restriction < 4) && !$game_actors[@father_id].dead?
end
本来不想用$game_actors的 不过还是算了
以下引用dbshy于2008-6-16 21:01:00的发言:
。。。
game_party.actors[father_id].maseter_id_position = father_id放在那个IF中
[本贴由作者于 2008-6-16 21:03:02 最后编辑]
以下引用link006007于2008-6-16 21:13:33的发言:
这是为什么呢?
$game_party.actors[father_id].pet_id
是这个么...
我已经废了...
以下引用dbshy于2008-6-16 21:14:15的发言:
if $game_party.actors[father_id].pet_id != 0
else
放在这里
[本贴由作者于 2008-6-16 21:14:57 最后编辑]
以下引用dbshy于2008-6-16 21:01:00的发言:
class Game_Actor中加attr_accessor :maseter_id_position
class Sprite_Pet中加$game_party.actors[father_id].maseter_id_position = father_id
self.x = $game_party.actors[@father_id].maseter_id_position * 160 + 85
公共事件a = $game_party.actors[1]
$game_party.actors[1] = $game_party.actors[
2]
$game_party.actors[2] = a
$game_party.actors[1].maseter_id_position= 2
$game_party.actors[2].maseter_id_position= 1
game_party.actors[father_id].maseter_id_position = father_id放在那个IF中
[本贴由作者于 2008-6-16 21:03:02 最后编辑]
以下引用dbshy于2008-6-16 21:49:23的发言:
if $game_party.actors[father_id].pet_id != 0
$game_party.actors[father_id].maseter_id_position = father_id
else
是这样.....
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |