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

just when I thought one of the greatest game of all time couldn't get any better, they announce a new dlc for it.
For anyone interested: there's another huge humble bundle with JRPG assets + a game jam starting next month - it's for a good cause, so check it out <3
Turning a specific vibe into reality is incredibly difficult. For instance, this song is one of the ones I listen to when working on my post apocalyptic project, and getting it's "feeling" into the game has been a real challenge.

I don't just wanna regurgitate the numbers I see, I wanna actually understand the calculations I'm making so I'm probably gonna make a post later with some calculations and what I THINK they mean to get some advice and corrections.

Edit: All (Most) of these will be tested in game prior. I just wanna make sure I understand what's going on under the hood if you will.
my girlfriend calls all my little chibi art cute lol... funny considering that wasn't the original art style of the game.

Forum statistics

Threads
113,778
Messages
1,077,373
Members
147,808
Latest member
traviscot
Top