Help - Search - Members - Calendar
Full Version: Enemy Transformation Problems
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Zyria
I've got this really weird problem going on in the battles of my game. I set an enemy to transform into a different enemy every three turns. Both forms have different attacks and different strengths and weaknesses to various elements. When the enemy is supposed to transform, it alters its strengths and weaknesses, but it will keep using attacks from its form before the transformation and will not use any of the new attacks that its new form is supposed to use. I should also note that the enemy graphic also changes when it transforms so the only thing that won't change is its set of attacks. Can anyone help me on this? Thanks.
Kread-EX
Are you using a script which alters classes such as Game_BattleAction or Game_Enemy? I remember having experienced similar problem while meddling with some Xiderowg scripts like ActionEX.
Zyria
Yeah, I was using an Analyze script and when I deleted it, the transformations started working perfectly. Do you know if there is any way to get around this or is the only way just to leave the scripts out?
Kread-EX
If I know which Analyze script you're using, it should be fixable.
Zyria
It's Trickster's Steal Script. It has an option to analyze enemies (I wasn't using the steal portion of the scripts).
Kread-EX
Can't find it. More specifically, I can only find a modified version without the analyze part. Can you post a link?
Zyria
Here's a link to all of the scripts used in the steal+analyze skills (via Notepad). There's a big gap in between each script so you know when one starts and ends. I'm only using the analyze portion of the script, not the steal portion.

http://www.mediafire.com/?8uva54ocjfvkidf#
Kread-EX
This is a small modification to the transformation method. Put it just above Main.

CODE
#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
#  This class handles enemies. It's used within the Game_Troop class
#  ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Transform
  #     enemy_id : ID of enemy to be transformed
  #--------------------------------------------------------------------------
  def transform(enemy_id)
    # Change enemy ID
    @enemy_id = enemy_id
    # Change battler graphics
    @battler_name = $data_enemies[@enemy_id].battler_name
    @battler_hue = $data_enemies[@enemy_id].battler_hue
    # Remake action
    @actions = $data_enemies[@enemy_id].actions.dup
    make_action
  end
end
Zyria
Great, it works now. Thanks very much for your help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.