OcRam - Audio_EX plugin

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
191
Reaction score
204
First Language
German
Primarily Uses
RMMV
Almost same as I thought to do, here is what I've done so far...
Code:
    AudioManager.playDynamicSe = function (event_id, se_name, distance, radius, auto_pan) {
        this.playSe(
            { name: se_name, volume: 100, pitch: 100, pan: 0 },
            {
                "type": "d",
                "distance": distance || 20,
                "radius": radius || 1,
                "fade": 0,
                "pan": auto_pan || true,
                "forced": true,
                "new": true,
                "started": false,
                "dynamic": true,
                "commandIndex": 0,
                "eventId": event_id || 0,
                "linkedEvents": event_id ? [event_id] : []
            }
        );
    };
Event id is required because otherwise this plugin don't know which event is emitting the SE.

EDIT: I have now released new version v2.06
I've tested the new command a bit, and come upon a few problems.
I created an event of a soldier that runs into a wall, then returns to his position only to run into the wall again.
issue.png
The first problem is that the volume of the sound is unaffected by the distance. No matter how near or far you are, the volume remains the same.
-> Distance & radius does not affect volume

The second problem is that if you move while the sound effect plays, it gets aborted.
This does not occur with normal SEs.
-> moving interrupts the sound effect
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
518
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
I've tested the new command a bit, and come upon a few problems.
I created an event of a soldier that runs into a wall, then returns to his position only to run into the wall again.
View attachment 148296
The first problem is that the volume of the sound is unaffected by the distance. No matter how near or far you are, the volume remains the same.
-> Distance & radius does not affect volume

The second problem is that if you move while the sound effect plays, it gets aborted.
This does not occur with normal SEs.
-> moving interrupts the sound effect
Hi,

Just tested this and it worked for me... Has plugin name remained as OcRam_Audio_EX.js?

And is event id 1 confirmed as "this" event? To get id of "this" event use: this.event().id
Example: AudioManager.playDynamicSe(this.event().id, "Blow5", 3, 2, true);

And to get more natural sound I wouldn't recommend distance below 10 (but it's only my opinion ;) ).
 

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
191
Reaction score
204
First Language
German
Primarily Uses
RMMV
Hi,

Just tested this and it worked for me... Has plugin name remained as OcRam_Audio_EX.js?

And is event id 1 confirmed as "this" event? To get id of "this" event use: this.event().id
Example: AudioManager.playDynamicSe(this.event().id, "Blow5", 3, 2, true);

And to get more natural sound I wouldn't recommend distance below 10 (but it's only my opinion ;) ).
Yeah, I went through my plugins just now and deactivated & activated stuff and it turns out that Irina's Anti Audio Delay plugin is at fault here.
So for the record, if anyone wants to use the dynamic sound effects - don't use the Anti Audio Delay plugin. They don't function together. xD
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
518
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
Yeah, I went through my plugins just now and deactivated & activated stuff and it turns out that Irina's Anti Audio Delay plugin is at fault here.
So for the record, if anyone wants to use the dynamic sound effects - don't use the Anti Audio Delay plugin. They don't function together. xD
Have you tried different plugin order?
 

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
191
Reaction score
204
First Language
German
Primarily Uses
RMMV
Have you tried different plugin order?
Doesn't work, the anti delay has functions that get in the way. For instance it seems that it buffers sound effects by directly assigning them to an event, which is why the volume & sound doesn't change. It can't change much because it gets locked in.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

When you discover great tileset resources that you completely forgot that you had. :kaomad3::kaopride:
Just got a better look at the MZ RTP. I'm very happy with it, especially the sci-fi tiles and sprites. Glad I pre-ordered.
I've just checked the VisuStella Plugins for MZ and there are already 11 plugins. The Yanfly team(perhaps a big one?) really works so effectively and efficiently that some MZ users can likely use tons of Yanfly plugins right after MZ's released (still 13 days from now). I wonder if any other plugin developer(or team) will try to compete with Yanfly this time, no matter how slim the chance to win is :)
Hello! :kaopride:I am new to RPG Maker, though I have been lurking the forums for a while. :kaoswt: Hope to make some friends and learn some stuff here! :kaothx:
And now since I've got the whole game parts working, the *contents* await.

Forum statistics

Threads
100,594
Messages
977,584
Members
132,194
Latest member
linkvaovn88com
Top