Sure, you'd just need to do that with a script. Use the script command and do
AudioManager.playSe({ name: 'foldername/filename', volume: 100, pitch: 100});There's more details in this spreadsheet, row 935 and 967 are particularly relevant here.
Sure, you'd just need to do that with a script. Use the script command and do
AudioManager.playSe({ name: 'foldername/filename', volume: 100, pitch: 100});I'm just getting an error message that it is failing to load. This is in a clean project, too. No plugins enabled.
RPG Maker, why are you doing this? I have this kind of thing with images in my game, and I assumed that surely audio files are loaded in a similar way. Apparently they're not xD
AudioManager.createBuffer = function (folder, name) {
var ext = this.audioFileExt();
var encodedName = name.split('/').map(encodeURIComponent).join('/');
var url = this._path + folder + '/' + encodedName + ext;
if (this.shouldUseHtml5Audio() && folder === 'bgm') {
if (this._blobUrl) Html5Audio.setup(this._blobUrl);
else Html5Audio.setup(url);
return Html5Audio;
} else {
return new WebAudio(url);
}
};
That did the trick! Thank you so much! You saved a lot of headache for me scrolling through a massive list of SE files lol. I like the amount of granularity this provides me with the volume control as well, so I can fine-tune it here instead of having to open up the audio file.
You always had that control. The number you're passing in for "volume" in this script call is the same number you'd type into the event command to play an SE.
Oh duh lol. I honestly don't know why I didn't think of that xD You get so used to using the slider. With the script you can make it louder than 100% though, so that's nice 🙂
Game_Actions have a few functions to get the scope (isForOne(), isForAll(), isForUser(), etc.).
Perfect, thank you.
@Zodai, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.
I assume you're using MZ. If you need help with a plugin, start a new thread in Plugin Support.
I think that will need a plugin.
Show Battle Log Text:
BattleManager._logWindow.addText("Hello!");
Set Actor Face Image + Refresh Battle Status:
const actor = $gameParty.members()[0]; // leader
actor.setFaceImage("Actor1", 0); // Actor1.png, index 0 (first face)
$gamePlayer.refresh();
SceneManager._scene._statusWindow.preparePartyRefresh(); // MZ
whoops, thank you. Since it had been a few days I thought there was an expiration on it, my apologies!
Welcome!
Unfortunately there isn't. Sometimes you can do that by making an alias that undoes whatever that line was doing, e.g. if it changes some value your alias can change it back. But there's nothing that will work for every case.
As Mac15001900 said, you can't exactly comment things out, but you can sometimes find workarounds to achieve a similar effect. For example, say that you want this function to *not* create a 'Save' command:
Window_MenuCommand.prototype.makeCommandList = function() {
this.addMainCommands();
this.addFormationCommand();
this.addOriginalCommands();
this.addOptionsCommand();
this.addSaveCommand();
this.addGameEndCommand();
};
this.addSaveCommand(); line, you could simply leave that line in, and overwrite the Window_MenuCommand.prototype.makeCommandList function so that it's an empty function that does nothing:Window_MenuCommand.prototype.addSaveCommand = function() { };
Game_CharacterBase.prototype.setPosition = function(x, y) {
this._x = Math.round(x);
this._y = Math.round(y);
this._realX = x;
this._realY = y;
};
this._realX. Instead of overwriting that function and commenting the line out, you could just patch the function and undo the effects of that line afterward:const _Game_CharacterBase_setPosition = Game_CharacterBase.prototype.setPosition;
Game_CharacterBase.prototype.setPosition = function(x, y) {
const tempRealX = this._realX;
_Game_CharacterBase_setPosition.apply(this, arguments);
if (this._realX !== tempRealX) {
this._realX = tempRealX;
}
};
Original thread: https://forums.rpgmakerweb.com/threads/javascript-questions-that-dont-deserve-their-own-thread.46341/