Event sounds bug out and create lag

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
309
Reaction score
248
First Language
English
Primarily Uses
RMVXA
So I have 3 parallel process events that are supposed to give you radiation when entering different zones. Each one has a different sound, and gives different amounts. They work fine when by themselves, but if I try to run more than one the sounds fluctuate between not working and speeding up. The framerate also drops a huge amount. (Ignore the fact that two of them show action button activation, they are supposed to all be parallel processes.)

Screenshot (489).pngScreenshot (490).pngScreenshot (491).png
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
285
Reaction score
70
First Language
English
Primarily Uses
RMXP
Not sure about this but have you tried adding some wait counter?
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
309
Reaction score
248
First Language
English
Primarily Uses
RMVXA
I just did, and it solved the framerate issue but not the sound one. The sounds are now really choppy.
 

Mewgles

Veteran
Veteran
Joined
Jul 24, 2020
Messages
70
Reaction score
70
First Language
German
Primarily Uses
RMMZ
You can't run more than 1 BGS at a time. You have to make sure to fadeout the previous BGS before using a new one in order to avoid those issues.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,573
Reaction score
6,496
First Language
Indonesian
Primarily Uses
RMVXA
Why not put all of them in a single parallel process? There is no reason for them in a separate process. You can do all of them in a single process.

Also to prevent lag, only "activate" the event when the player region ID is changed.
To illustrate, you're going to do this (I'm too lazy to set up the event, so I'm giving you the pseudocode)

-> Check if the player region ID is changed
And by this, I don't mean to check if the player is equal to something. But do it like this

- Decide which variable ID to hold the player's region ID
- Check if the variable is not equal with the player's region ID
- If not equal, perform BGS change
- Re-Assign player's region ID to that variable
- Put all the region id based damage below that

This way, play BGS only happens ONCE when the region ID is changed. Not all times.
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,941
Reaction score
13,579
First Language
English
Primarily Uses
RMMV
Also add a Wait 5-10 Frames at the very beginning of the parallel process event. Your player is not going to change regions 60 times a second.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,888
Reaction score
521
First Language
English
Primarily Uses
N/A
Why not just make it all one event and check the players position with variables?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,941
Reaction score
13,579
First Language
English
Primarily Uses
RMMV
Actually, if these events are all on the same map and all have a parallel process trigger, it's never going to work the way you want.

The first event will fadeout BGM if the player is not on region 1.
The second will fadeout BGM if the player is not on region 2.
The third will fadeout BGM if the player is not on region 3.

As the player can only be on one region at a time only one of these events can ever be true, and the other two will be false. That means one event is always going to be playing BGM, and the other two events are going to be fading it out. This is why it's choppy.

If they are all on the same map, you probably want to do something like this:

Code:
wait 5 frames
if player region is different to the last player region (will need to use a variable to store the last player region)
  if player region is 1
    play BGM 1
    do other stuff
  else
    if player region is 2
      play BGM 2
      do other stuff
    else
      if player region is 3
        play BGM 3
        do other stuff
      else
        fadeout BGM
      end
    end
  end
end
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Exhaustion sickness hitting me again near deadline whyyyy (sobs)
thats it, i 've had it, I will NOT promote my game as a "retro RPG" when its done, i have in the past but it is literally the first thing on every rpg maker game description to the point that you'd think the sales pitch came with the RTP. I refuse to use that angle.
My memory is embellishing the quality of NES era game assets :/ .... I need to stop comparing my work to somthing that was groundbreaking decades ago. Especially since its not as good as I seem to keep remembering it to be.
I finally found something that pleased me to organize my tasks. :)
I am thinking about redoing my portfolio video...

Forum statistics

Threads
103,198
Messages
997,964
Members
134,676
Latest member
spoonmaster12
Top