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,496
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,512
Reaction score
534
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 Profile Posts


Score Rundown for the demo I'm trying to get done before Halloween, Or around it. Ending is based on your score currently.
Oh goooood, why am putting so many skills into my game AAAAAAAAAAAA!
Stream will be live shortly with some pixel art! Feel free to drop by!
Actor2_8 added!

Forum statistics

Threads
103,154
Messages
997,696
Members
134,632
Latest member
GaiaEx
Top