01-20-2010, 01:54 AM
It isn't just hidden classes. No - no - no . :cheery:
Place a condition to check an @instance value around your aliased method in question, and immediately set that @instance value to something other than 'nil'.
As you can see (and thanks to SephirothSpawn for showing me this), I wrap an entire method in an if...end block that has a condition....
which right after it, I set the @derv_anim_bat_stack value to 'true'.
It will only perform this method if the @instance value is nil, whereupon I set the @instance to something else. And, yeah. This part of Animated Battlers did create the dreaded F12 crash years ago until this fixed it.
Place a condition to check an @instance value around your aliased method in question, and immediately set that @instance value to something other than 'nil'.
Code:
#--------------------------------------------------------------------------
# * Fallen Pose
#--------------------------------------------------------------------------
if @derv_anim_bat_stack.nil?
@derv_anim_bat_stack = true
alias mnk_collapse collapse
def collapse
if @battler.is_a?(Game_Actor)
mnk_collapse if DEFAULT_ACTOR
mnk_collapse if DEFAULT_COLLAPSE_ACTOR
if DEFAULT_ACTOR_ID != nil
mnk_collapse if DEFAULT_ACTOR_ID.include?(@battler.id)
end
else
mnk_collapse if DEFAULT_ENEMY
mnk_collapse if DEFAULT_COLLAPSE_ENEMY
if DEFAULT_ENEMY_ID != nil
mnk_collapse if DEFAULT_ENEMY_ID.include?(@battler.id)
end
end
end
end
As you can see (and thanks to SephirothSpawn for showing me this), I wrap an entire method in an if...end block that has a condition....
Code:
if @derv_anim_bat_stack.nil?
@derv_anim_bat_stack = true
---the whole aliased block--
end
It will only perform this method if the @instance value is nil, whereupon I set the @instance to something else. And, yeah. This part of Animated Battlers did create the dreaded F12 crash years ago until this fixed it.