Enemy named after actor?

leuchtstein

Warper
Member
Joined
Mar 11, 2018
Messages
3
Reaction score
0
First Language
German
Primarily Uses
RMVXA
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].

When encountering:

But, when attacking:

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.
 

dsiver144

Peaceful Days Dev
Veteran
Joined
Sep 19, 2013
Messages
263
Reaction score
819
First Language
Vietnamese
Primarily Uses
RMVXA
You can add this small script to fix that problem. :D
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
246
Reaction score
70
First Language
English
Primarily Uses
RMVXA
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.
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,573
Reaction score
6,497
First Language
Indonesian
Primarily Uses
RMVXA
@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
 

leuchtstein

Warper
Member
Joined
Mar 11, 2018
Messages
3
Reaction score
0
First Language
German
Primarily Uses
RMVXA
Thanks for all of your replies. But I never actually worked with scripts. Could someone explain how to implement those suggestions of yours?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,513
Reaction score
537
First Language
English
Primarily Uses
RMVXA
Click on the link in my signature block for Andar's Tutorial for beginners on using scripts.
 

leuchtstein

Warper
Member
Joined
Mar 11, 2018
Messages
3
Reaction score
0
First Language
German
Primarily Uses
RMVXA
I tried your solutions and they worked! Thank you :) It displays the name now correctly.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I just like this website:
lol
I streamed Moonfall on 9/25/20
and have started a page to showcase my vids/stream :kaoluv:

Please subscribe and follow, it's free, it's quick and one sub means so much to me, it would really make my day~ :wub

And now to face my worst enemy... adding color :kaocry:
Power has been restored FINALLY to our home in Lake Charles. Hurricane Laura tried to wreck our lives and disrupt my work on the commercial project i have going with Cloud 9 but the key word is TRIED!!! Slowly moving from the shelter to home over the next week or so. I WILL NOT QUIT!
I am happy because the RPG Maker MZ character comes with extra bust and full body art, but I am disappointed because the quality of the character's PIxel art has decreased.
Only My Opinion that Pixel art MV is better.

Forum statistics

Threads
103,231
Messages
998,216
Members
134,721
Latest member
isaton
Top