public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

Making actors and enemies float when State affected

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Making actors and enemies float when State affected
  • Original author: Randor01
  • Original date: August 19, 2020
  • Source thread: https://forums.rpgmakerweb.com/threads/making-actors-and-enemies-float-when-state-affected.125444/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support

Summary

Hello! I was searching for a plugin that would allow me to do like the title says: a "Float" state effect that makes the target float in mid-air. During my research i found this plugin (https://raw.githubusercontent.com/triacontane/RPGMakerMV/master/BattlerGraphicExtend.js) that permits me to do just that. Sadly, i the plugin description specifies that the floating effect works only on battlers, and not enemies. So i tried to add my own function in the plugin to implement this, but i admit to have no idea how to do this. Could someone help me out...

Archived First Post

Hello! I was searching for a plugin that would allow me to do like the title says: a "Float" state effect that makes the target float in mid-air. During my research i found this plugin (https://raw.githubusercontent.com/triacontane/RPGMakerMV/master/BattlerGraphicExtend.js) that permits me to do just that. Sadly, i the plugin description specifies that the floating effect works only on battlers, and not enemies. So i tried to add my own function in the plugin to implement this, but i admit to have no idea how to do this.
Could someone help me out in this? Thanks in advance!


EDIT: I think i've found a solution! Place this at the bottom of the plugin, where the Sprite_Enemy functions are located:

Code:
    var _Sprite_Enemy_updatePosition      = Sprite_Enemy.prototype.hasOwnProperty('updatePosition') ?
    Sprite_Enemy.prototype.updatePosition : null;
    Sprite_Enemy.prototype.updatePosition = function() {
        if (_Sprite_Enemy_updatePosition) {
            _Sprite_Enemy_updatePosition.apply(this, arguments);
        } else {
            Sprite_Battler.prototype.updatePosition.call(this);
        }
        var altitude = this._battler.getAltitude();
        this._offsetY = altitude;
    };

Hope it helps ^^

EDIT2: Ok, now another problem arises. I noticed that when an actor is affected by a State, the state's icon won't follow the actor's new position while floating, remaining in the original place. So i tried to change the code for actor sprites:

Code:
    var _Sprite_Actor_updatePosition      = Sprite_Actor.prototype.hasOwnProperty('updatePosition') ?
        Sprite_Actor.prototype.updatePosition : null;
    Sprite_Actor.prototype.updatePosition = function() {
        if (_Sprite_Actor_updatePosition) {
            _Sprite_Actor_updatePosition.apply(this, arguments);
        } else {
            Sprite_Battler.prototype.updatePosition.call(this);
        }
        var altitude = this._battler.getAltitude();

        this._mainSprite.y   = altitude;
        this._weaponSprite.y = altitude;
        this._stateSprite.y = altitude;
        this._stateIconSprite.y = altitude;
    };

And i thought that i could simply add the altitude value to StateSprite and StateIconSprite. This, however, doesn't do anything, and even if their y parameter is changed, their position remains the same.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#rpg-maker-archive#js-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar