OcRam - Audio_EX plugin

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
192
Reaction score
207
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
522
Reaction score
611
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
192
Reaction score
207
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
522
Reaction score
611
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
192
Reaction score
207
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

Quexp wrote on Shaz's profile.
I absolutely love your profile/pic! :kaoluv:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)
Things I thought would never happen but just did: I needed to use my snow shovel. In August. In the Northern Hemisphere.
So I finished Cupcake, now I need to figure out my next project!
Do I pick up one of my incomplete games?
Do I start something entirely new???
The possibilities are endless!

Forum statistics

Threads
100,682
Messages
978,384
Members
132,308
Latest member
Amarina
Top