Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RESOLVED]Changing the enemy's graphic

I'm looking to change a monster's battler graphic. I'm not transforming it, just change it, i tried using@data_enemies[1].battler_name, but it didn't work. any ideas or did i mess up somewhere?
 
i have a boss that's a clam and every so often it goes into it's shell and is impervious to attack then comes out of the shell. i don't want to do the whole transform thing because that would make it a WHOLE other monster and i would have to more step than i'd want to make that work.
 

MicKo

Member

First of all you need to say to RMXP that you want to be able to change a battler's graphics' name. To do that, just add this somwhere above main.
[ruby]class Game_Battler
  attr_accessor :battler_name
end
[/ruby]
Now, during combat, just make a call script that says :
[ruby]$game_troop.enemies[enemy_id].battler_name = "battler name"
[/ruby]
Of course, change enemy_id and "battler name" to real values.
To bring it back to normal, do the same thing.
 

Atoa

Member

MicKo":2ync0ko8 said:
[ruby]$game_troop.enemies[enemy_id].battler_name = "battler name"
[/ruby]
Of course, change enemy_id and "battler name" to real values.
To bring it back to normal, do the same thing.
It's not Enemy ID, it's enemy INDEX (the position of the enemy on the troop)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top