- Joined
- Oct 26, 2015
- Messages
- 10
- Reaction score
- 7
- First Language
- English
- Primarily Uses
- RMMV
Thank you for the quick reply.It works fine with yanfly's stuff, including his core engine. I'm betting the problem is Foreground.js, whatever that is.
// ******************* FIRE *******************
if (command === 'fire') {
$gameVariables.SetFire(true);
} else {
$gameVariables.SetFire(false);
}
} else if (command === "light" || command === "flashlight") {
// ******************* FIRE *******************
if (command === 'fire') {
$gameVariables.SetFire(true);
} else if (command === "light" || command === "flashlight") {
$gameVariables.SetFire(false);
}
Looking at it, I think I found the problem. In this line in his override of Game_Interpreter.prototype.pluginCommand, he's basically saying "if the plugin command (regardless of which plugin it targets) isn't "fire" then turn off flickering which is...horrible to say the least
Code:// ******************* FIRE ******************* if (command === 'fire') { $gameVariables.SetFire(true); } else { $gameVariables.SetFire(false); }
You can fix it (maybe, no promises it'll work or won't break other things) by replacing the else statement with this:
Code:} else if (command === "light" || command === "flashlight") {
So:
Code:// ******************* FIRE ******************* if (command === 'fire') { $gameVariables.SetFire(true); } else if (command === "light" || command === "flashlight") { $gameVariables.SetFire(false); }
script activate
-or-
light activate
script deactivate
-or-
light deactivate
// ******************** MAIN PLAYER SETTINGS ***************
if (command === 'light' || command === 'fire') {
//******************* Light radius 100 #FFFFFF ************************
if (args[0] == 'radius') {
//******************* Light radiusgrow 100 #FFFFFF ************************
if (args[0] === 'radiusgrow') {
if (command === 'fire') $gameVariables.SetFire(true);
else $gameVariables.SetFire(false);
//******************* Light radius 100 #FFFFFF ************************
if (args[0] == 'radius') {
if (command === 'fire') $gameVariables.SetFire(true);
else $gameVariables.SetFire(false);
//******************* Light radiusgrow 100 #FFFFFF ************************
if (args[0] === 'radiusgrow') {
if (command === 'fire') $gameVariables.SetFire(true);
else $gameVariables.SetFire(false);
// ************* FLASHLIGHT *******************
if (command === 'flashlight') {
$gameVariables.SetFire(false);
// ************* FLASHLIGHT *******************
if (command === 'flashlight') {
$gameVariables.SetFire(false);
I don't know, I've considered taking it up multiple times to fix various things, but every time I look at the code, I find myself running in the opposite direction. Maybe after I finish my current game, but that's not a promise. It really is a messy script and again, I mean no disrespect to Terrax when I say that. (This issue you've seen with fire flickering is a great example of what I mean)
Anyway, you actually can switch the script on or off via plugin command:
to turn it on:
to turn it off:Code:script activate -or- light activate
Code:script deactivate -or- light deactivate
Now a little insight into the fix I added to the flickering: Before, it was basically saying "if the plugin command is 'fire' then turn on flickering. If the plugin command is anything else, no matter what, turn off flickering." The fix I made was "if the plugin command is 'fire' turn on flickering, otherwise, if the plugin command is 'light' or 'flashlight' then turn flickering off.
While it wasn't an ideal fix, it was a fix that would be easiest to share via these forums. This might work a little better:
Just below what we changed, there should be the following line:
Code:// ******************** MAIN PLAYER SETTINGS *************** if (command === 'light' || command === 'fire') { //******************* Light radius 100 #FFFFFF ************************ if (args[0] == 'radius') {
And a bit lower down:
Code://******************* Light radiusgrow 100 #FFFFFF ************************ if (args[0] === 'radiusgrow') {
Right after those two, insert the following:
Code:if (command === 'fire') $gameVariables.SetFire(true); else $gameVariables.SetFire(false);
So each should look like this, respectively:
Code://******************* Light radius 100 #FFFFFF ************************ if (args[0] == 'radius') { if (command === 'fire') $gameVariables.SetFire(true); else $gameVariables.SetFire(false);
Code://******************* Light radiusgrow 100 #FFFFFF ************************ if (args[0] === 'radiusgrow') { if (command === 'fire') $gameVariables.SetFire(true); else $gameVariables.SetFire(false);
Finally, locate this line:
Code:// ************* FLASHLIGHT ******************* if (command === 'flashlight') {
And right below it, add
Code:$gameVariables.SetFire(false);
So:
Code:// ************* FLASHLIGHT ******************* if (command === 'flashlight') { $gameVariables.SetFire(false);
You may want to back the plugin up before applying these changes, first. I haven't tested them, but they should work
// ******************* FIRE *******************
// ******************* FIRE *******************
if (command === 'fire') {
$gameVariables.SetFire(true);
} else if (command === "light" || command === "flashlight") {
$gameVariables.SetFire(false);
}
// ******************* FIRE *******************
// ******************* FIRE *******************
/*
if (command === 'fire') {
$gameVariables.SetFire(true);
} else if (command === "light" || command === "flashlight") {
$gameVariables.SetFire(false);
}
*/