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
525
Reaction score
1,524
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

Who's a fan of firearms? The 5 on the bottom row (not including the green laser ones) I made pretty recently. I plan for most of these to be in my project.

Screenshot 2021-09-28 165924.png
Doing RPG Maker News for 28th September 2021

RMMV - Skip script errors:

For game developer testing purposes.
You know, I really get to farm likes since I post all of @Avery and @hiddenone 's blog tutorials on the forums...
Back from a very long hiatus with a new project woo
This is my battler placeholder image trying out art styles too I want to fake a backview battle system
I think I will want portraits and battle sprites to be 2D and stick to pixel art for overworld not 100%sure but pretty sure its easier to make pixel art for overworld sprites, events and maps and stuff.
Placeholder.png

Forum statistics

Threads
115,441
Messages
1,089,951
Members
150,229
Latest member
Mythphnx
Top