Status
Not open for further replies.

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
342
Reaction score
171
First Language
spanish
Primarily Uses
N/A
I am looking for a way to make an actor invisible when is affected by a state, what I did is simply change the sprite for a blank one, the problem is the shadow still there.

Is there any plugin, event or script to make a single actor shadow disabled temporary?
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
476
Reaction score
567
First Language
French
Primarily Uses
RMMZ
Hello, this is the method that update the actor shadows in sprite.js:
Code:
Sprite_Actor.prototype.updateShadow = function() {
    this._shadowSprite.visible = !!this._actor;
};
You could copy the method in a plugin and add a condition to check if the actor is not affected by the invisble state, like:
Code:
Sprite_Actor.prototype.updateShadow = function() {
    this._shadowSprite.visible = !!this._actor && !this._actor.isStateAffected(X);
};

Regards
 

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
342
Reaction score
171
First Language
spanish
Primarily Uses
N/A
It's perfect,

Thank you so much!
 
  • Like
Reactions: TSR

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,934
Reaction score
15,990
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Tried something. Little sneak peak of Unity AD.
M42S7Us.gif

It's the little things. Lengthened the time the bar fades in and out to be a bit more comfortable.
3 days until release!

Forum statistics

Threads
125,734
Messages
1,173,104
Members
164,878
Latest member
INKYLIKE
Top