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.

VX - Hide enemy battler

Hello, I'm requesting for a script that makes an enemy battler transparent.

What I want to do is when an enemy uses an attack, I want it to show an animation for the attack, but it includes the enemy in the animation so it looks like the enemy is attacking a character.
Now, my problem is that if I do it like this, the enemy appears on the screen twice (one for the actual battler and another for the animation). So I need a way for the enemy's battler to disappear while the animation plays. I haven't found a way to do this with normal eventing (although, I could be overlooking something) so I believe I'll be needing a script for this. Ideas that I've thought of to initiate this script are to have it be activated when a certain enemy is placed under a condition and have that enemy turn invisible, or have a switch activate it.

If it's possible for this script to be created- or if someone knows of a way the enemy using the attack could be turned invisible- I would greatly appreciate it. Thank you.
 
I didn't had the time to test this. This will check if the battler is attacking and if he's the target of an animation.
If these 2 conditions are met, he'll turn invisible. Otherwise, he'll be visible.
Code:
class Sprite_Battler < Sprite_Base
  alias dargor_vx_battler_anim_visible_update_battler_bitmap update_battler_bitmap
  def update_battler_bitmap
    dargor_vx_battler_anim_visible_update_battler_bitmap
    update_animation_visibility
  end
  def update_animation_visibility
    if @battler.action.attack? and animation?
      @battler_visible = false
    else
      @battler_visible = true
    end
  end
end 
 
hmmm, well I tested it, but it didn't quite work. it looked like the enemy disappeared for a frame though, so maybe that's what happened. Although, I'm not sure if it would of worked anyway.. gah I should of said this in the first post, but I am showing the animation through a common event, the monster is still the target of the attack though (in the system that is, although the animation makes it look like its attacking a PC, if you know what I mean...).

Anyway, I tried the script out for when I set the enemy as the effect of the attack in the skills section too (just to test the script), but that gave me the same results of the disappearing for a frame and then reappearing.
 
well, I'm not using any scripts like that, just purely with common events and what not because I couldn't quite understand Tankentai and how to make animated attacks... So I'm not really sure how to do that (unless that is something you can do with just the basic RPG Maker functions, although I'm pretty sure it isn't). Show picture FTW?

The reason I want enemies to disappear is because I've made a system that is similar to Super Mario RPG with the timed button presses, so I go through common events to do the calls. I've got it working for the heroes, but I'm trying to make it so the player can defend against enemy attacks so for melee attackers it requires me to have them move up to the player. so, I'd like for the enemies to disappear while they do it so that it can be shown through animation.
 

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