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 work late on the game so I sleep in then I wake up late so I have to work hard to make up for sleeping in meaning I work late again and sleep in again... what a nasty cycle.
I just had my first real fire. Dad made burgers for lunch and the grill caught fire. He tried to get water but I told him you should never put water on a grease fire. So I got him the fire extinguisher under the sink and we managed to put it out. I can still smell a little of the smoke coming from the patio, but at least it's clearing. It sure was scary though.
was rendering a video and window decided to bsod on me :D fun
Could not for the life of me figure out how to implement the dual/triple techs in Touch the Stars in a player-friendly way. Was describing all the problems to my wife and just rubber-ducked a solution that should work brilliantly.
I think I'm going to make each equippable item in my fantasy RPG grant a skill while its worn (in addition to the character's learned skills). Equipped gear that might be weaker in stats can still be useful in certain situations if the skill they grant exploits a weakness or resists a strength in the monsters being fought. This could potentially open up lots of build strategies to play with for fun.

Forum statistics

Threads
113,838
Messages
1,077,859
Members
147,905
Latest member
Arcansel
Top