Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Shrimpses on April 05, 2018, 02:01:43 am

Title: [RMXP][RESOLVED] Strange issues with mad.array's Blinking script.
Post by: Shrimpses on April 05, 2018, 02:01:43 am
Hello! I thought I'd make a new thread for this, rather than necro one that hasn't been active for five years. I hope that's alright. :uhm:

A few weeks ago, I stumbled across this script in the database. (http://forum.chaos-project.com/index.php?topic=13003.0). It makes actor sprites blink, and it's downright adorable. I'd love to use it in my game, but I've run into a problem that I can't solve on my own. I know it's a long shot, but I thought I'd try asking you guys for help.

Basically, the script uses move routes to briefly swap actors with their "blink" sprites. The problem is that it randomly overwrites other graphic-changing move routes. In my game, the party members walk out of the player during cutscenes. But now, at least half the time, one of them fails to appear. Like I said, it's totally random - if you play a scene twice, different members may show up. Likewise, when the party returns to the player at the end of the scene, at least one of them usually stays behind.

I threw together a quick demo to illustrate what I mean. If you talk to the dog in the lower-left, 24 copies of a sprite should appear; and if you talk to it again, they should vanish. Try it a few times and see how many no-shows you can count.

>>Mediafire link to the demo<< (http://www.mediafire.com/file/iraj34nlgq7anr3/Blink+Test.rar)

I'd be extremely thankful for any help you guys can give!  :)
Title: Re: [RMXP] Strange issues with mad.array's Blinking script.
Post by: KK20 on April 05, 2018, 04:59:15 am
The problem is because the graphic is requesting a change at the same time it is returning from a closed eyes to open eyes state. The notion that "the script uses move routes to briefly swap actors with their 'blink' sprites" is not correct.

When the eyes are requested to close, a variable holds the original name of the graphic.
@base_character_name = @character_name

When the eyes reopen, it resets the name back
@character_name = @base_character_name


I'll look into fixing this later this week.

Also, it's okay to necro if the question is related to the topic at hand.
Title: Re: [RMXP] Strange issues with mad.array's Blinking script.
Post by: Shrimpses on April 05, 2018, 03:01:01 pm
Oh, I see. That makes sense. My knowledge of Ruby is still a bit splotchy.

Anyway, thanks so much for your help!
Title: Re: [RMXP] Strange issues with mad.array's Blinking script.
Post by: KK20 on April 07, 2018, 03:43:39 am
Added fix to the script's topic
http://forum.chaos-project.com/index.php/topic,13003.msg196624.html#msg196624
Title: Re: [RMXP][RESOLVED] Strange issues with mad.array's Blinking script.
Post by: Shrimpses on April 07, 2018, 01:18:13 pm
It works perfectly, thank you so much!

I'll credit you in the game, but I wish I knew how to do more.