Enemy named after actor?

● ARCHIVED · READ-ONLY
Started by leuchtstein 7 posts View original ↗
  1. Hello!
    I´m pretty new to the RPG Maker (VX Ace), and I wanted to make a fight against an "actor".
    I named the enemy \N[1] (First actor), which worked with the encountered message, but when Im choosing a target to attack, it still shows \N[1].
    mCaZ0MK.png
    When encountering:
    HOxuIGu.png
    But, when attacking:
    A2BuP6L.png
    The user names the actor himself, so I cant give him a fixed name. Is there a way to accomplish that?
    Thanks in advance, leuchtstein.
  2. You can add this small script to fix that problem. :D
    [embedded media]
  3. Here's another way:

    Code:
    class Game_Enemy <  Game_Battler
    alias  :dl_aename_initialize :initialize
     def initialize(index, enemy_id)
      dl_aename_initialize(index, enemy_id)
      @original_name = $game_actors[1].name + "?" if enemy_id == CHANGETHIS
     end
    end

    Didn't test this yet, but this should replace the enemy name with the name of your MainHero? Just make sure that CHANGETHIS is replaced with the ID of your enemy.

    Edit: You're right, Theo. Enemy has an @original_name.
  4. @Harosata Game_Enemy does not have "@ name" variable.
    My personal approach would be something similar, but
    Code:
    class Game_Enemy <  Game_Battler
      alias alter_name name
      def name
        return $game_actors[1].name + "?" if enemy_id == 1 # <-- change this
        return alter_name
      end
    end
  5. Thanks for all of your replies. But I never actually worked with scripts. Could someone explain how to implement those suggestions of yours?
  6. Click on the link in my signature block for Andar's Tutorial for beginners on using scripts.
  7. I tried your solutions and they worked! Thank you :) It displays the name now correctly.