Disabling Floating (Yanfly's Animated Battlers)

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
Yanfly's plugin: http://yanfly.moe/2015/12/13/yep-44-animated-sideview-enemies/

enable enemies to have a floating property where they levitate up and down in the air. This is defined via <Floating> within the enemy's note tag. I'm trying to figure out a way to temporarily/permanently disable that property during battle. Ideally, I'd like to inflict a state who has a "No Floating" property that takes priority over the <Floating> property.

I went looking into the coding and came across lines 1302-1305:
Code:
Game_Enemy.prototype.isFloating = function() {
    if (this.isDead()) return false;
    return this.enemy().sideviewFloating;
};
and changed it to:
Code:
Game_Enemy.prototype.isFloating = function() {
    if (this.isDead() || this.isStateAffected(158)) return false;
    return this.enemy().sideviewFloating;
};
where state 158 is the state I wish to have the Floating-cancelling property. I tested it and it works the way I want it to, so sharing this for anyone else that may be interested. Also, if this is actually not recommended to do, or there's another better method to achieve this, feel free to enlighten me.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
682
Reaction score
598
First Language
German
Primarily Uses
RMMV
You don't need to change the code and add a state.
Just change the variable sideviewFloating on an enemy to false/true.

So for example
$gameTroop.members()[0].enemy().sideviewFloating = false
$gameTroop.members()[0].enemy().sideviewFloating = true

or just
$dataEnemies[ID].sideviewFloating = true
$dataEnemies[ID].sideviewFloating = false
 
Last edited:

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
@waynee95 ooh, thanks a lot! Is it completely recommended to use that method instead? Cause I just needed to change one line in the plugin and it's automated now as opposed to writing a few more lines in the state to manage that variable as true or false for the relevant actor/enemy.
Edit: Well, I'd probably like to be able to apply it to actors too thinking about it more now.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
682
Reaction score
598
First Language
German
Primarily Uses
RMMV
Nah, both are fine.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top