Creating an appearance shift/"flicker" (Solved)

Status
Not open for further replies.

BrandedTales

StoryTeller
Veteran
Joined
Dec 30, 2016
Messages
203
Reaction score
116
First Language
English
Primarily Uses
N/A
Greetings all -

Looking for some advice on how to achieve a certain effect. I'll outline what I'm trying to do, then I'll outline how I'm trying to do it and where I'm getting stuck. Certainly if there's a better way to do it, I'm definitely open to it.

My game toys with the concept of reality, and there are NPC's who appear as one thing, but are actually something else. In these cases, there is a slight "flicker" where the sprite will shift to what the NPC actually is. It doesn't last long, and the sprite is shifted back to the mask. This flicker would occur somewhat sporadically (or at least seemingly sporadic to the player), but the amount of time spent in the "true" state is increased based on one of the player's skills increasing.

I run a parallel event that has an incrementing variable each loop. When the variable hits a certain value, it starts over at 1.
Each "flickering" event has a "shift" number assigned to a variable, and a "shift back" number assigned.

Within the parallel event, if my incrementing number equals a shift number, I use the Movement feature to change the sprite.
If my incrementing number equals a "shift back" number, I use Movement feature to change the sprite back.

---

This process works fine, as I'm able to adjust the shift numbers up or down based on my player's skill, which widens the time spent in the true state. My problem is that this is a very cumbersome process to do, since it must be manually coded within my parallel event for each NPC. That doesn't scale very well if I have a large number of NPCs, turning my code into a mess.

I'd like to know if there's a way to pass an event as a parameter to a common event, or a way to loop through the events, or automate the shift on the actual events themselves so I don't have to list all the sprite changes inside my parallel loop...

Anything to automate some of the steps (or a better way to do this!)
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,478
First Language
Indonesia
Primarily Uses
RMMV
. . . .
Can't you just use the event autonomous movement to change its graphic?
event.png

If it's about how the interval changes based on player's skill, you can bind it to a variable and use "wait" command through a script call.
IDK, the script call for wait command $gameInterpreter.wait(n) might works differently for movement route.
 

BrandedTales

StoryTeller
Veteran
Joined
Dec 30, 2016
Messages
203
Reaction score
116
First Language
English
Primarily Uses
N/A
That's a really interesting concept that I hadn't thought of. Let me play around with it tonight!
 

BrandedTales

StoryTeller
Veteran
Joined
Dec 30, 2016
Messages
203
Reaction score
116
First Language
English
Primarily Uses
N/A
Worked perfect! Thanks again!

--edit--
And before I am called out, I am properly ashamed I replied to the thread and violated forum etiquette rather than edit my last post!

*slaps own wrist*
 
Last edited:
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

I don't believe it. I actually did some proofreading in my game - and fixed some grammar errors! I feel so accomplished, knowing I can actually proofread my own writing!
...I've had a bad day, okay? Bad enough for me to want to proofread stuff. :yswt2:
Ughhh, July is not my month. Thankfully, it's nearly done.

I fixed the lips and noses for MZ! The files have been updated.
qQwgk8C.png

Everything below!
Ugh, I opened MV after a few weeks and I'm completely lost on what I was working on.
Does it happen to someone else or am I the only disorganized one around? :kaoswt:
xH5Fk2f.jpg
Today was not a really productive day, but at least i got some bust sketches going <3
E7QXZHNXoAIkpG8
hmm in exploring MZ with FOSSIL... I see I'll probably need to stick with MV for now as none of the menu altering plugins I use work on MZ lol. and I don't have the money to dump into what I would need in some cases to update plugins to their MZ versions. Everytime I think of converting, 5 or more reasons popup on why I shouldn't.

Forum statistics

Threads
113,665
Messages
1,076,526
Members
147,683
Latest member
Small_gnome
Top